本文整理汇总了PHP中Commande::charger方法的典型用法代码示例。如果您正苦于以下问题:PHP Commande::charger方法的具体用法?PHP Commande::charger怎么用?PHP Commande::charger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Commande
的用法示例。
在下文中一共展示了Commande::charger方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getList
public function getList($order, $critere, $debut, $nbres)
{
$query = $this->getRequest('list', $order, $critere, $debut, $nbres);
$resul = $this->query($query);
$retour = array();
while ($resul && ($row = $this->fetch_object($resul))) {
$thisClient = array();
$thisClient['ref'] = $row->ref;
$thisClient['entreprise'] = $row->entreprise;
$thisClient['nom'] = $row->nom;
$thisClient['prenom'] = $row->prenom;
$thisClient['email'] = $row->email;
$commande = new Commande();
$devise = new Devise();
$querycom = "SELECT id FROM {$commande->table} WHERE client={$row->id} AND statut NOT IN(" . Commande::NONPAYE . "," . Commande::ANNULE . ") ORDER BY date DESC LIMIT 0,1";
$resulcom = $commande->query($querycom);
if ($commande->num_rows($resulcom) > 0) {
$idcom = $commande->get_result($resulcom, 0, "id");
$commande->charger($idcom);
$devise->charger($commande->devise);
$thisClient['date'] = strftime("%d/%m/%Y %H:%M:%S", strtotime($commande->date));
$thisClient['somme'] = formatter_somme($commande->total(true, true)) . ' ' . $devise->symbole;
} else {
$thisClient['date'] = '';
$thisClient['somme'] = '';
}
$retour[] = $thisClient;
}
return $retour;
}
示例2: liste_clients
function liste_clients($order, $critere, $debut)
{
$i = 0;
$client = new Client();
$query = "select * from {$client->table} order by {$critere} {$order} limit {$debut},20";
$resul = $client->query($query);
while ($resul && ($row = $client->fetch_object($resul))) {
$fond = "ligne_" . ($i++ % 2 ? "claire" : "fonce") . "_rub";
$commande = new Commande();
$devise = new Devise();
$querycom = "select id from {$commande->table} where client={$row->id} and statut not in(" . Commande::NONPAYE . "," . Commande::ANNULE . ") order by date DESC limit 0,1";
$resulcom = $commande->query($querycom);
$existe = 0;
if ($commande->num_rows($resulcom) > 0) {
$existe = 1;
$idcom = $commande->get_result($resulcom, 0, "id");
$commande->charger($idcom);
$devise->charger($commande->devise);
$date = strftime("%d/%m/%y %H:%M:%S", strtotime($commande->date));
}
$creation = strftime("%d/%m/%y %H:%M:%S", strtotime($row->datecrea));
?>
<ul class="<?php
echo $fond;
?>
">
<li style="width:122px;"><?php
echo $row->ref;
?>
</li>
<li style="width:110px;"><?php
echo $creation;
?>
</li>
<li style="width:143px;"><?php
echo $row->entreprise;
?>
</li>
<li style="width:243px;"><?php
echo $row->nom;
?>
<?php
echo $row->prenom;
?>
</li>
<li style="width:110px;"><?php
if ($existe) {
echo $date;
}
?>
</li>
<li style="width:63px;"><?php
if ($existe) {
echo formatter_somme($commande->total(true, true)) . ' ' . $devise->symbole;
}
?>
</li>
<li style="width:40px;"><a href="client_visualiser.php?ref=<?php
echo $row->ref;
?>
" class="txt_vert_11"><?php
echo trad('editer', 'admin');
?>
</a></li>
<li style="width:25px; text-align:center;"><a href="#" onclick="confirmSupp('<?php
echo $row->ref;
?>
')"><img src="gfx/supprimer.gif" width="9" height="9" border="0" /></a></li>
</ul>
<?php
}
}
示例3: boucleTva
function boucleTva($texte, $args)
{
$res = "";
$commande_id = lireTag($args, "commande", "int");
if (!empty($commande_id)) {
$commande = new Commande();
if ($commande->charger($commande_id)) {
$venteprod = new Venteprod();
$query = "\n\t\t\t\t\tselect\n\t\t\t\t\t\tsum(prixu * quantite) as totalttc,\n\t\t\t\t\t\ttva\n\t\t\t\t\tfrom\n\t\t\t\t\t\t{$venteprod->table}\n\t\t\t\t\twhere\n\t\t\t\t\t\tcommande={$commande_id}\n\t\t\t\t\tgroup by\n\t\t\t\t\t\ttva\n\t\t\t\t";
$resul = CacheBase::getCache()->query($query);
if (!empty($resul)) {
foreach ($resul as $row) {
if (floatval($row->tva) > 0) {
$tmp = $texte;
$totalht = $row->totalttc / (1 + $row->tva / 100);
$montant = $row->totalttc - $totalht;
$tmp = str_replace("#TAUX", $row->tva, $tmp);
$tmp = str_replace("#MONTANT", formatter_somme($montant), $tmp);
$tmp = str_replace("#TOTALHT", formatter_somme($totalht), $tmp);
$tmp = str_replace("#TOTALTTC", formatter_somme($row->totalttc), $tmp);
$res .= $tmp;
}
}
}
}
}
return $res;
}
示例4: supprcmd
function supprcmd($id)
{
$tempcmd = new Commande();
if ($tempcmd->charger($id)) {
$tempcmd->annuler();
}
}
示例5: Commande
}
if (!isset($client)) {
$client = "";
}
if (!isset($page)) {
$page = 0;
}
if (!isset($classement)) {
$classement = "";
}
?>
<?php
if ($action == "supprimer") {
$tempcmd = new Commande();
if ($tempcmd->charger($id)) {
$tempcmd->annuler();
}
}
?>
<?php
if (empty($_GET['statut'])) {
$_GET['statut'] = Commande::NONPAYE . "," . Commande::PAYE . "," . Commande::TRAITEMENT;
}
if ($_GET['statut'] == '*') {
$search = "";
} else {
if ($_GET['statut'] != "") {
$search = "and statut IN(" . $_GET['statut'] . ")";
}
示例6: Produit
$adr->adresse2 = $client->adresse2;
$adr->adresse3 = $client->adresse3;
$adr->cpostal = $client->cpostal;
$adr->ville = $client->ville;
$adr->tel = $client->telfixe . " " . $client->telport;
$adr->pays = $client->pays;
$adrcli = $adr->add();
$commande->adrfact = $adrcli;
$commande->adrlivr = $adrcli;
$commande->facture = 0;
$commande->lang = ActionsLang::instance()->get_id_langue_courante();
$devise = ActionsDevises::instance()->get_devise_courante();
$commande->devise = $devise->id;
$commande->taux = $devise->taux;
$idcmd = $commande->add();
$commande->charger($idcmd);
for ($i = 0; $i < $nbart; $i++) {
$produit = new Produit();
$venteprod = new Venteprod();
if ($produit->charger($sessionventeprod[$i]->ref)) {
$produit->stock -= $sessionventeprod[$i]->quantite;
$poids += $produit->poids;
$produit->maj();
}
$venteprod->ref = $sessionventeprod[$i]->ref;
$venteprod->titre = $sessionventeprod[$i]->titre;
$venteprod->quantite = $sessionventeprod[$i]->quantite;
$venteprod->tva = $sessionventeprod[$i]->tva;
$venteprod->prixu = $sessionventeprod[$i]->prixu;
$venteprod->commande = $idcmd;
$venteprod->add();