mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Clean code
This commit is contained in:
parent
58fa1ac626
commit
5891fd3022
|
|
@ -3634,7 +3634,7 @@ class Facture extends CommonInvoice
|
|||
$this->date_validation = $now;
|
||||
$i = 0;
|
||||
|
||||
if (getDolGlobalString('INVOICE_USE_SITUATION')) {
|
||||
if (getDolGlobalInt('INVOICE_USE_SITUATION')) {
|
||||
$final = true;
|
||||
$nboflines = count($this->lines);
|
||||
while (($i < $nboflines) && $final) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ if ($user->socid) {
|
|||
$object = new Facture($db);
|
||||
// Load object
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$ret = $object->fetch($id, $ref, '', 0, (getDolGlobalString('INVOICE_USE_SITUATION') ? $conf->global->INVOICE_USE_SITUATION : 0));
|
||||
$ret = $object->fetch($id, $ref, '', 0, getDolGlobalInt('INVOICE_USE_SITUATION'));
|
||||
}
|
||||
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
|
||||
$hookmanager->initHooks(array('invoicecontactcard', 'globalcard'));
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ $action = GETPOST('action', 'aZ09');
|
|||
$object = new Facture($db);
|
||||
// Load object
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$object->fetch($id, $ref, '', 0, (getDolGlobalString('INVOICE_USE_SITUATION') ? $conf->global->INVOICE_USE_SITUATION : 0));
|
||||
$object->fetch($id, $ref, '', 0, getDolGlobalInt('INVOICE_USE_SITUATION'));
|
||||
}
|
||||
|
||||
$permissionnote = $user->hasRight('facture', 'creer'); // Used by the include of actions_setnotes.inc.php
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
// for retro compatibility
|
||||
if (getDolGlobalString('INVOICE_USE_SITUATION_RETAINED_WARRANTY') && !getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')) {
|
||||
// before it was only for final situation invoice
|
||||
$conf->global->INVOICE_USE_RETAINED_WARRANTY = $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY;
|
||||
$conf->global->INVOICE_USE_RETAINED_WARRANTY = getDolGlobalString('INVOICE_USE_SITUATION_RETAINED_WARRANTY');
|
||||
$conf->global->USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user