本文整理汇总了PHP中FactureFournisseur::calculate_date_lim_reglement方法的典型用法代码示例。如果您正苦于以下问题:PHP FactureFournisseur::calculate_date_lim_reglement方法的具体用法?PHP FactureFournisseur::calculate_date_lim_reglement怎么用?PHP FactureFournisseur::calculate_date_lim_reglement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FactureFournisseur
的用法示例。
在下文中一共展示了FactureFournisseur::calculate_date_lim_reglement方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GETPOST
$object->ref_supplier = $_POST['ref_supplier'];
$object->socid = $_POST['socid'];
$object->libelle = $_POST['libelle'];
$object->date = $datefacture;
$object->date_echeance = $datedue;
$object->note_public = GETPOST('note_public');
$object->note_private = GETPOST('note_private');
$object->cond_reglement_id = GETPOST('cond_reglement_id');
$object->mode_reglement_id = GETPOST('mode_reglement_id');
$projectid = GETPOST('projectid');
if ($projectid > 0) {
$object->fk_project = $projectid;
}
// Auto calculation of date due if not filled by user
if (empty($object->date_echeance)) {
$object->date_echeance = $object->calculate_date_lim_reglement();
}
if ($_POST['origin'] && $_POST['originid']) {
$object->linked_objects = $orders_id;
$id = $object->create($user);
if ($id > 0) {
foreach ($orders_id as $origin => $origin_id) {
$origin_id = !empty($origin_id) ? $origin_id : $orders_id[$ii];
$object->add_object_linked($_POST['origin'], $origin_id);
}
while ($ii < $nn) {
$objectsrc = new CommandeFournisseur($db);
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
$result = $objectsrc->fetch($orders_id[$ii]);
if ($result > 0) {
$lines = $objectsrc->lines;
示例2: createFacture
function createFacture(&$object, &$TLine)
{
global $user, $conf, $langs, $db;
dol_include_once('/fourn/class/fournisseur.facture.class.php');
$facture = new FactureFournisseur($db);
$facture->origin = $object->element;
$facture->origin_id = $object->id;
$facture->ref = '';
$facture->ref_supplier = '';
//$facture->ref_supplier = $object->ref_supplier;
$facture->socid = $object->socid;
$facture->libelle = $object->libelle;
$object->date = time();
$facture->note_public = $object->note_public;
$facture->note_private = $object->note_private;
$facture->cond_reglement_id = $object->cond_reglement_id;
$facture->fk_account = $object->fk_account;
$facture->fk_project = empty($object->fk_project) ? null : $object->fk_project;
$facture->fk_incoterms = $object->fk_incoterms;
$facture->location_incoterms = $object->location_incoterms;
$facture->ref_supplier = time();
$facture->date_echeance = $facture->calculate_date_lim_reglement();
foreach ($TLine as &$row) {
$line = $row->line;
$line->qty = $row->qty;
$line->id = 0;
$facture->lines[] = $line;
}
$res = $facture->create($user);
if ($res > 0) {
header('location:' . dol_buildpath('/fourn/facture/card.php?action=editref_supplier&id=' . $res, 1));
exit;
} else {
//var_dump($res, $facture);
setEventMessage("ImpossibleToCreateInvoice", "errors");
}
}
开发者ID:ATM-Consulting,项目名称:dolibarr_module_facturerreception,代码行数:37,代码来源:actions_facturerreception.class.php