本文整理汇总了PHP中Propal::addline方法的典型用法代码示例。如果您正苦于以下问题:PHP Propal::addline方法的具体用法?PHP Propal::addline怎么用?PHP Propal::addline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Propal
的用法示例。
在下文中一共展示了Propal::addline方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if ($price_base_type != 'HT')
{
$pu_ht = price2num($pu_ttc / (1 + ($tva_tx/100)), 'MU');
}
else
{
$pu_ttc = price2num($pu_ht * (1 + ($tva_tx/100)), 'MU');
}
}
$result = $propal->addline($propal->id,
$desc,
$pu_ht,
$_POST["qty"],
$tva_tx,
$localtax1_tx, // localtax1
$localtax2_tx, // localtax2
$prod->id,
$_POST["remise_percent"],
$price_base_type,
$pu_ttc
);
if ($result > 0)
{
Header("Location: ".DOL_URL_ROOT."/comm/propal.php?id=".$propal->id);
return;
}
$mesg = $langs->trans("ErrorUnknown").": $result";
}
/*
示例2: GETPOST
$price_base_type = $prodcustprice->lines[0]->price_base_type;
$prod->tva_tx = $prodcustprice->lines[0]->tva_tx;
}
}
}
// On reevalue prix selon taux tva car taux tva transaction peut etre different
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
if ($tva_tx != $object->tva_tx) {
if ($price_base_type != 'HT') {
$pu_ht = price2num($pu_ttc / (1 + $tva_tx / 100), 'MU');
} else {
$pu_ttc = price2num($pu_ht * (1 + $tva_tx / 100), 'MU');
}
}
if (GETPOST('propalid') > 0) {
$result = $propal->addline($desc, $pu_ht, GETPOST('qty'), $tva_tx, $localtax1_tx, $localtax2_tx, $object->id, GETPOST('remise_percent'), $price_base_type, $pu_ttc, 0, 0, -1, 0, 0, 0, 0, '', '', '', 0, $object->fk_unit);
if ($result > 0) {
header("Location: " . DOL_URL_ROOT . "/comm/propal.php?id=" . $propal->id);
return;
}
setEventMessages($langs->trans("ErrorUnknown") . ": {$result}", null, 'errors');
} elseif (GETPOST('commandeid') > 0) {
$result = $commande->addline($desc, $pu_ht, GETPOST('qty'), $tva_tx, $localtax1_tx, $localtax2_tx, $object->id, GETPOST('remise_percent'), '', '', $price_base_type, $pu_ttc, '', '', 0, -1, 0, 0, null, 0, '', 0, $object->fk_unit);
if ($result > 0) {
header("Location: " . DOL_URL_ROOT . "/commande/card.php?id=" . $commande->id);
exit;
}
} elseif (GETPOST('factureid') > 0) {
$result = $facture->addline($desc, $pu_ht, GETPOST('qty'), $tva_tx, $localtax1_tx, $localtax2_tx, $object->id, GETPOST('remise_percent'), '', '', '', '', '', $price_base_type, $pu_ttc, Facture::TYPE_STANDARD, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', $object->fk_unit);
if ($result > 0) {
header("Location: " . DOL_URL_ROOT . "/compta/facture.php?facid=" . $facture->id);
示例3: GETPOST
{
$pu_ht = price2num($pu_ttc / (1 + ($tva_tx/100)), 'MU');
}
else
{
$pu_ttc = price2num($pu_ht * (1 + ($tva_tx/100)), 'MU');
}
}
$result = $propal->addline(
$propal->id,
$desc,
$pu_ht,
GETPOST('qty'),
$tva_tx,
$localtax1_tx, // localtax1
$localtax2_tx, // localtax2
$prod->id,
GETPOST('remise_percent'),
$price_base_type,
$pu_ttc
);
if ($result > 0)
{
Header("Location: ".DOL_URL_ROOT."/comm/propal.php?id=".$propal->id);
return;
}
$mesg = $langs->trans("ErrorUnknown").": $result";
}