New: Add option MAIN_DISABLE_PDF_AUTOUPDATE
This commit is contained in:
parent
d0738e5d7b
commit
15db353eb4
@ -161,7 +161,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes')
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
@ -191,7 +191,7 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->propale
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -343,7 +343,7 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||
exit;
|
||||
@ -602,7 +602,7 @@ if ($action == 'modif' && $user->rights->propale->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
|
||||
if ($_POST['action'] == "setabsolutediscount" && $user->rights->propale->creer)
|
||||
@ -726,22 +726,22 @@ if ($_POST['action'] == "addline" && $user->rights->propale->creer)
|
||||
{
|
||||
// Insert line
|
||||
$result=$object->addline(
|
||||
$_POST["id"],
|
||||
$desc,
|
||||
$pu_ht,
|
||||
$_POST['qty'],
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$_POST['idprod'],
|
||||
$_POST['remise_percent'],
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$info_bits,
|
||||
$type,
|
||||
-1,
|
||||
0,
|
||||
$_POST['fk_parent_line']
|
||||
$_POST["id"],
|
||||
$desc,
|
||||
$pu_ht,
|
||||
$_POST['qty'],
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$_POST['idprod'],
|
||||
$_POST['remise_percent'],
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$info_bits,
|
||||
$type,
|
||||
-1,
|
||||
0,
|
||||
$_POST['fk_parent_line']
|
||||
);
|
||||
|
||||
if ($result > 0)
|
||||
@ -756,7 +756,7 @@ if ($_POST['action'] == "addline" && $user->rights->propale->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
@ -814,18 +814,19 @@ if ($_POST['action'] == 'updateligne' && $user->rights->propale->creer && $_POST
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $object->updateline($_POST['lineid'],
|
||||
$up_ht,
|
||||
$_POST['qty'],
|
||||
$_POST['remise_percent'],
|
||||
$vat_rate,
|
||||
$localtax1_rate,
|
||||
$localtax2_rate,
|
||||
$_POST['desc'],
|
||||
'HT',
|
||||
$info_bits,
|
||||
$special_code,
|
||||
$_POST['fk_parent_line']
|
||||
$result = $object->updateline(
|
||||
$_POST['lineid'],
|
||||
$up_ht,
|
||||
$_POST['qty'],
|
||||
$_POST['remise_percent'],
|
||||
$vat_rate,
|
||||
$localtax1_rate,
|
||||
$localtax2_rate,
|
||||
$_POST['desc'],
|
||||
'HT',
|
||||
$info_bits,
|
||||
$special_code,
|
||||
$_POST['fk_parent_line']
|
||||
);
|
||||
|
||||
// Define output language
|
||||
@ -838,7 +839,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->propale->creer && $_POST
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
}
|
||||
|
||||
@ -951,7 +952,7 @@ if ($action == 'up' && $user->rights->propale->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid'));
|
||||
exit;
|
||||
@ -973,7 +974,7 @@ if ($action == 'down' && $user->rights->propale->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid'));
|
||||
exit;
|
||||
|
||||
@ -158,7 +158,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes')
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -260,25 +260,25 @@ if ($action == 'add' && $user->rights->commande->creer)
|
||||
}
|
||||
|
||||
$result = $object->addline(
|
||||
$object_id,
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$datestart,
|
||||
$dateend,
|
||||
$product_type,
|
||||
$lines[$i]->rang,
|
||||
$lines[$i]->special_code,
|
||||
$fk_parent_line
|
||||
$object_id,
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$datestart,
|
||||
$dateend,
|
||||
$product_type,
|
||||
$lines[$i]->rang,
|
||||
$lines[$i]->special_code,
|
||||
$fk_parent_line
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
@ -579,25 +579,25 @@ if ($action == 'addline' && $user->rights->commande->creer)
|
||||
{
|
||||
// Insert line
|
||||
$result = $object->addline(
|
||||
$id,
|
||||
$desc,
|
||||
$pu_ht,
|
||||
$_POST['qty'],
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$_POST['idprod'],
|
||||
$_POST['remise_percent'],
|
||||
$info_bits,
|
||||
0,
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$date_start,
|
||||
$date_end,
|
||||
$type,
|
||||
-1,
|
||||
'',
|
||||
$_POST['fk_parent_line']
|
||||
$id,
|
||||
$desc,
|
||||
$pu_ht,
|
||||
$_POST['qty'],
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$_POST['idprod'],
|
||||
$_POST['remise_percent'],
|
||||
$info_bits,
|
||||
0,
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$date_start,
|
||||
$date_end,
|
||||
$type,
|
||||
-1,
|
||||
'',
|
||||
$_POST['fk_parent_line']
|
||||
);
|
||||
|
||||
if ($result > 0)
|
||||
@ -612,7 +612,7 @@ if ($action == 'addline' && $user->rights->commande->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
@ -692,20 +692,21 @@ if ($action == 'updateligne' && $user->rights->commande->creer && $_POST['save']
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
$result = $object->updateline($_POST['lineid'],
|
||||
$description,
|
||||
$up_ht,
|
||||
$_POST['qty'],
|
||||
$_POST['remise_percent'],
|
||||
$vat_rate,
|
||||
$localtax1_rate,
|
||||
$localtax2_rate,
|
||||
'HT',
|
||||
$info_bits,
|
||||
$date_start,
|
||||
$date_end,
|
||||
$type,
|
||||
$_POST['fk_parent_line']
|
||||
$result = $object->updateline(
|
||||
$_POST['lineid'],
|
||||
$description,
|
||||
$up_ht,
|
||||
$_POST['qty'],
|
||||
$_POST['remise_percent'],
|
||||
$vat_rate,
|
||||
$localtax1_rate,
|
||||
$localtax2_rate,
|
||||
'HT',
|
||||
$info_bits,
|
||||
$date_start,
|
||||
$date_end,
|
||||
$type,
|
||||
$_POST['fk_parent_line']
|
||||
);
|
||||
|
||||
if ($result >= 0)
|
||||
@ -720,7 +721,7 @@ if ($action == 'updateligne' && $user->rights->commande->creer && $_POST['save']
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -754,7 +755,7 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->command
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
}
|
||||
|
||||
@ -794,7 +795,7 @@ if ($action == 'modif' && $user->rights->commande->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
}
|
||||
|
||||
@ -819,7 +820,7 @@ if ($action == 'up' && $user->rights->commande->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
@ -841,7 +842,7 @@ if ($action == 'down' && $user->rights->commande->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
|
||||
@ -169,8 +169,8 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes')
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if ($result > 0)
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) $result=facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if ($result >= 0)
|
||||
{
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id);
|
||||
exit;
|
||||
@ -330,7 +330,7 @@ if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->facture->v
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -387,7 +387,7 @@ if ($action == 'modif' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $us
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
}
|
||||
|
||||
@ -759,28 +759,28 @@ if ($action == 'add' && $user->rights->facture->creer)
|
||||
}
|
||||
|
||||
$result = $object->addline(
|
||||
$id,
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$lines[$i]->rang,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line
|
||||
$id,
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$lines[$i]->rang,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line
|
||||
);
|
||||
|
||||
if ($result > 0)
|
||||
@ -978,28 +978,28 @@ if (($action == 'addline' || $action == 'addline_predef') && $user->rights->fact
|
||||
{
|
||||
// Insert line
|
||||
$result = $object->addline(
|
||||
$id,
|
||||
$desc,
|
||||
$pu_ht,
|
||||
$_POST['qty'],
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$_POST['idprod'],
|
||||
$_POST['remise_percent'],
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$info_bits,
|
||||
'',
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$type,
|
||||
-1,
|
||||
0,
|
||||
'',
|
||||
0,
|
||||
GETPOST('fk_parent_line')
|
||||
$id,
|
||||
$desc,
|
||||
$pu_ht,
|
||||
$_POST['qty'],
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$_POST['idprod'],
|
||||
$_POST['remise_percent'],
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$info_bits,
|
||||
'',
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$type,
|
||||
-1,
|
||||
0,
|
||||
'',
|
||||
0,
|
||||
GETPOST('fk_parent_line')
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1017,7 +1017,7 @@ if (($action == 'addline' || $action == 'addline_predef') && $user->rights->fact
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
@ -1089,20 +1089,21 @@ if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save']
|
||||
// Update line
|
||||
if ($result >= 0)
|
||||
{
|
||||
$result = $object->updateline(GETPOST('lineid'),
|
||||
$description,
|
||||
$up_ht,
|
||||
GETPOST('qty'),
|
||||
GETPOST('remise_percent'),
|
||||
$date_start,
|
||||
$date_end,
|
||||
$vat_rate,
|
||||
$localtax1_rate,
|
||||
$localtax2_rate,
|
||||
'HT',
|
||||
$info_bits,
|
||||
$type,
|
||||
GETPOST('fk_parent_line')
|
||||
$result = $object->updateline(
|
||||
GETPOST('lineid'),
|
||||
$description,
|
||||
$up_ht,
|
||||
GETPOST('qty'),
|
||||
GETPOST('remise_percent'),
|
||||
$date_start,
|
||||
$date_end,
|
||||
$vat_rate,
|
||||
$localtax1_rate,
|
||||
$localtax2_rate,
|
||||
'HT',
|
||||
$info_bits,
|
||||
$type,
|
||||
GETPOST('fk_parent_line')
|
||||
);
|
||||
|
||||
// Define output language
|
||||
@ -1115,7 +1116,7 @@ if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save']
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1143,7 +1144,7 @@ if ($action == 'up' && $user->rights->facture->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
@ -1165,7 +1166,7 @@ if ($action == 'down' && $user->rights->facture->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
|
||||
@ -112,7 +112,7 @@ if ($action == 'confirm_valide' && GETPOST('confirm') == 'yes' && $user->rights-
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
facture_pdf_create($db, $fac, '', $fac->modelpdf, $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $fac, '', $fac->modelpdf, $outputlangs, $hookmanager);
|
||||
}
|
||||
|
||||
Header('Location: fiche.php?id='.$paiement->id);
|
||||
|
||||
@ -94,7 +94,7 @@ if ($_REQUEST['action'] == 'confirm_valide' && $_REQUEST['confirm'] == 'yes' &&
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
facture_pdf_create($db, $fac, '', $fac->modelpdf, $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $fac, '', $fac->modelpdf, $outputlangs, $hookmanager);
|
||||
}
|
||||
|
||||
Header('Location: fiche.php?id='.$paiement->id);
|
||||
|
||||
@ -297,19 +297,19 @@ if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
{
|
||||
// Insert line
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$pu_ht,
|
||||
$_POST["pqty"],
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$_POST["idprod"],
|
||||
$_POST["premise"],
|
||||
$date_start,
|
||||
$date_end,
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$info_bits
|
||||
$desc,
|
||||
$pu_ht,
|
||||
$_POST["pqty"],
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$_POST["idprod"],
|
||||
$_POST["premise"],
|
||||
$date_start,
|
||||
$date_end,
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$info_bits
|
||||
);
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
contrat_pdf_create($db, $object->id, $object->modelpdf, $outputlangs);
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) contrat_pdf_create($db, $object->id, $object->modelpdf, $outputlangs);
|
||||
*/
|
||||
}
|
||||
else
|
||||
@ -1044,7 +1044,7 @@ else
|
||||
{
|
||||
$product=new Product($db);
|
||||
$product->fetch($objp->fk_product);
|
||||
$dateactend = dol_time_plus_duree (time(), $product->duration_value, $product->duration_unit);
|
||||
$dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1093,7 +1093,7 @@ else
|
||||
{
|
||||
$product=new Product($db);
|
||||
$product->fetch($objp->fk_product);
|
||||
$dateactend = dol_time_plus_duree (time(), $product->duration_value, $product->duration_unit);
|
||||
$dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit);
|
||||
}
|
||||
}
|
||||
$now=mktime();
|
||||
|
||||
@ -164,8 +164,8 @@ if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->expedition
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs);
|
||||
if ($result <= 0)
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) $result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs);
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -291,20 +291,20 @@ if ($action == 'add' && $user->rights->fournisseur->facture->creer)
|
||||
if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end;
|
||||
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
'HT',
|
||||
$product_type
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
'HT',
|
||||
$product_type
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
@ -523,7 +523,7 @@ if ($action == 'addline')
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
//supplier_invoice_pdf_create($db, $fac->id, $fac->modelpdf, $outputlangs);
|
||||
//if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) supplier_invoice_pdf_create($db, $object->id, $object->modelpdf, $outputlangs);
|
||||
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
@ -592,7 +592,7 @@ if ($action == 'edit' && $user->rights->fournisseur->facture->creer)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
//supplier_invoice_pdf_create($db, $object->id, $object->modelpdf, $outputlangs);
|
||||
//if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) supplier_invoice_pdf_create($db, $object->id, $object->modelpdf, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -117,11 +117,11 @@ if ($_REQUEST["action"] == 'confirm_valid' && $_REQUEST["confirm"] == 'yes' && $
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=delivery_order_pdf_create($db, $delivery,$_REQUEST['model'],$outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) $result=delivery_order_pdf_create($db, $delivery,$_REQUEST['model'],$outputlangs);
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user