@@ -75,7 +75,7 @@ |
||
| 75 | 75 | array(dol_buildpath('/product/inventory/inventory.php?id='.$inventory->id.$get, 1), $langs->trans('Inventory'), 'inventory') |
| 76 | 76 | ); |
| 77 | 77 | |
| 78 | - $h=2; |
|
| 78 | + $h = 2; |
|
| 79 | 79 | |
| 80 | 80 | complete_head_from_modules($conf, $langs, $inventory, $head, $h, 'inventory'); |
| 81 | 81 | complete_head_from_modules($conf, $langs, $inventory, $head, $h, 'inventory', 'remove'); |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | $maxfilesizearray = getMaxFileSizeArray(); |
| 470 | 470 | $maxmin = $maxfilesizearray['maxmin']; |
| 471 | 471 | if ($maxmin > 0) { |
| 472 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 472 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 473 | 473 | } |
| 474 | 474 | $texte .= ' <input type="file" name="uploadfile">'; |
| 475 | 475 | $texte .= '<input type="hidden" value="PROJECT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); |
| 556 | 556 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 557 | 557 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 558 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 558 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 559 | 559 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
| 560 | 560 | // Get extension (ods or odt) |
| 561 | 561 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -564,11 +564,11 @@ discard block |
||
| 564 | 564 | if ($format == '1') { |
| 565 | 565 | $format = '%Y%m%d%H%M%S'; |
| 566 | 566 | } |
| 567 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 567 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 568 | 568 | } else { |
| 569 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 569 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 570 | 570 | } |
| 571 | - $file = $dir . '/' . $filename; |
|
| 571 | + $file = $dir.'/'.$filename; |
|
| 572 | 572 | //print "newdir=".$dir; |
| 573 | 573 | //print "newfile=".$newfile; |
| 574 | 574 | //print "file=".$file; |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | dol_mkdir($conf->project->dir_temp); |
| 578 | 578 | if (!is_writable($conf->project->dir_temp)) { |
| 579 | 579 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->project->dir_temp); |
| 580 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 580 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 581 | 581 | return -1; |
| 582 | 582 | } |
| 583 | 583 | |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | $maxfilesizearray = getMaxFileSizeArray(); |
| 435 | 435 | $maxmin = $maxfilesizearray['maxmin']; |
| 436 | 436 | if ($maxmin > 0) { |
| 437 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 437 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 438 | 438 | } |
| 439 | 439 | $texte .= ' <input type="file" name="uploadfile">'; |
| 440 | 440 | $texte .= '<input type="hidden" value="PROJECT_TASK_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -514,9 +514,9 @@ discard block |
||
| 514 | 514 | $newfiletmp = preg_replace('/\.(ods|odt)/i', '', $newfile); |
| 515 | 515 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 516 | 516 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 517 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 517 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 518 | 518 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
| 519 | - $file = $dir . '/' . $newfiletmp . '.odt'; |
|
| 519 | + $file = $dir.'/'.$newfiletmp.'.odt'; |
|
| 520 | 520 | //print "newdir=".$dir; |
| 521 | 521 | //print "newfile=".$newfile; |
| 522 | 522 | //print "file=".$file; |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | dol_mkdir($conf->project->dir_temp); |
| 526 | 526 | if (!is_writable($conf->project->dir_temp)) { |
| 527 | 527 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->project->dir_temp); |
| 528 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 528 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 529 | 529 | return -1; |
| 530 | 530 | } |
| 531 | 531 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $maxfilesizearray = getMaxFileSizeArray(); |
| 187 | 187 | $maxmin = $maxfilesizearray['maxmin']; |
| 188 | 188 | if ($maxmin > 0) { |
| 189 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 189 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 190 | 190 | } |
| 191 | 191 | $texte .= ' <input type="file" name="uploadfile">'; |
| 192 | 192 | $texte .= '<input type="hidden" value="RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | dol_mkdir($conf->recruitment->dir_temp); |
| 296 | 296 | if (!is_writable($conf->recruitment->dir_temp)) { |
| 297 | 297 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->recruitment->dir_temp); |
| 298 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 298 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 299 | 299 | return -1; |
| 300 | 300 | } |
| 301 | 301 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // General $Variables |
| 83 | -$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility |
|
| 83 | +$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility |
|
| 84 | 84 | $ref = GETPOST('ref', 'alpha'); |
| 85 | 85 | $socid = GETPOST('socid', 'int'); |
| 86 | 86 | $action = GETPOST('action', 'aZ09'); |
@@ -1009,7 +1009,7 @@ discard block |
||
| 1009 | 1009 | $error++; |
| 1010 | 1010 | } |
| 1011 | 1011 | |
| 1012 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 1012 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 1013 | 1013 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOST('date_pointoftaxmonth', 'int'), GETPOST('date_pointoftaxday', 'int'), GETPOST('date_pointoftaxyear', 'int'), 'tzserver'); |
| 1014 | 1014 | |
| 1015 | 1015 | // Replacement invoice |
@@ -1097,7 +1097,7 @@ discard block |
||
| 1097 | 1097 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
| 1098 | 1098 | $object->model_pdf = GETPOST('model'); |
| 1099 | 1099 | $object->fk_project = GETPOST('projectid', 'int'); |
| 1100 | - $object->cond_reglement_id = 0; // No payment term for a credit note |
|
| 1100 | + $object->cond_reglement_id = 0; // No payment term for a credit note |
|
| 1101 | 1101 | $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); |
| 1102 | 1102 | $object->fk_account = GETPOST('fk_account', 'int'); |
| 1103 | 1103 | $object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
@@ -1389,7 +1389,7 @@ discard block |
||
| 1389 | 1389 | $object->note_public = trim(GETPOST('note_public', 'restricthtml')); |
| 1390 | 1390 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
| 1391 | 1391 | $object->ref_client = GETPOST('ref_client'); |
| 1392 | - $object->ref_customer = GETPOST('ref_client'); |
|
| 1392 | + $object->ref_customer = GETPOST('ref_client'); |
|
| 1393 | 1393 | $object->model_pdf = GETPOST('model'); |
| 1394 | 1394 | $object->fk_project = GETPOST('projectid', 'int'); |
| 1395 | 1395 | $object->cond_reglement_id = (GETPOST('type') == 3 ? 1 : GETPOST('cond_reglement_id')); |
@@ -1941,7 +1941,7 @@ discard block |
||
| 1941 | 1941 | $object->fk_project = GETPOST('projectid', 'int'); |
| 1942 | 1942 | $object->cond_reglement_id = GETPOST('cond_reglement_id', 'int'); |
| 1943 | 1943 | $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); |
| 1944 | - $object->remise_absolue =price2num(GETPOST('remise_absolue'), 'MU', 2); |
|
| 1944 | + $object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU', 2); |
|
| 1945 | 1945 | $object->remise_percent = price2num(GETPOST('remise_percent'), '', 2); |
| 1946 | 1946 | $object->fk_account = GETPOST('fk_account', 'int'); |
| 1947 | 1947 | |
@@ -2025,7 +2025,7 @@ discard block |
||
| 2025 | 2025 | |
| 2026 | 2026 | // Set if we used free entry or predefined product |
| 2027 | 2027 | $predef = ''; |
| 2028 | - $product_desc =(GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); |
|
| 2028 | + $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); |
|
| 2029 | 2029 | |
| 2030 | 2030 | $price_ht = ''; |
| 2031 | 2031 | $price_ht_devise = ''; |
@@ -2219,8 +2219,8 @@ discard block |
||
| 2219 | 2219 | } |
| 2220 | 2220 | |
| 2221 | 2221 | //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time |
| 2222 | - if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
| 2223 | - $product_desc=''; |
|
| 2222 | + if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
| 2223 | + $product_desc = ''; |
|
| 2224 | 2224 | } |
| 2225 | 2225 | |
| 2226 | 2226 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -2470,7 +2470,7 @@ discard block |
||
| 2470 | 2470 | // Define special_code for special lines |
| 2471 | 2471 | $special_code = GETPOST('special_code', 'int'); |
| 2472 | 2472 | if ($special_code == 3) { |
| 2473 | - $special_code = 0; // Options should not exists on invoices |
|
| 2473 | + $special_code = 0; // Options should not exists on invoices |
|
| 2474 | 2474 | } |
| 2475 | 2475 | |
| 2476 | 2476 | $line = new FactureLigne($db); |
@@ -3084,7 +3084,7 @@ discard block |
||
| 3084 | 3084 | |
| 3085 | 3085 | if (isModEnabled('multicurrency')) { |
| 3086 | 3086 | $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
| 3087 | - $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
| 3087 | + $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
| 3088 | 3088 | } |
| 3089 | 3089 | |
| 3090 | 3090 | //Replicate extrafields |
@@ -3136,7 +3136,7 @@ discard block |
||
| 3136 | 3136 | |
| 3137 | 3137 | // when bank account is empty (means not override by payment mode form a other object, like third-party), try to use default value |
| 3138 | 3138 | if ($socid > 0 && $fk_account) { // A company has already been set and it has a default fk_account |
| 3139 | - $fk_account = GETPOSTISSET('fk_account') ? GETPOST("fk_account", 'int') : $fk_account; // The GETPOST is used only if form was posted to avoid to take default value, because in such case, the default must be the one of the company |
|
| 3139 | + $fk_account = GETPOSTISSET('fk_account') ? GETPOST("fk_account", 'int') : $fk_account; // The GETPOST is used only if form was posted to avoid to take default value, because in such case, the default must be the one of the company |
|
| 3140 | 3140 | } else { // No company forced |
| 3141 | 3141 | $fk_account = GETPOST("fk_account", 'int'); |
| 3142 | 3142 | } |
@@ -3167,7 +3167,7 @@ discard block |
||
| 3167 | 3167 | print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">'; |
| 3168 | 3168 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 3169 | 3169 | print '<input type="hidden" name="action" id="formtocreateaction" value="add">'; |
| 3170 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 3170 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 3171 | 3171 | if ($soc->id > 0) { |
| 3172 | 3172 | print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n"; |
| 3173 | 3173 | } |
@@ -3756,7 +3756,7 @@ discard block |
||
| 3756 | 3756 | // Payment mode |
| 3757 | 3757 | print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">'; |
| 3758 | 3758 | print img_picto('', 'bank', 'class="pictofixedwidth"'); |
| 3759 | - print $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && GETPOST('mode_reglement_id') != 0)? GETPOST('mode_reglement_id') : $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1); |
|
| 3759 | + print $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && GETPOST('mode_reglement_id') != 0) ? GETPOST('mode_reglement_id') : $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1); |
|
| 3760 | 3760 | print '</td></tr>'; |
| 3761 | 3761 | |
| 3762 | 3762 | // Bank Account |
@@ -3831,7 +3831,7 @@ discard block |
||
| 3831 | 3831 | print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; |
| 3832 | 3832 | print '<td colspan="2" class="maxwidthonsmartphone">'; |
| 3833 | 3833 | print img_picto('', 'currency', 'class="pictofixedwidth"'); |
| 3834 | - print $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany'))?GETPOST('multicurrency_code'):$currency_code), 'multicurrency_code'); |
|
| 3834 | + print $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ?GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code'); |
|
| 3835 | 3835 | print '</td></tr>'; |
| 3836 | 3836 | } |
| 3837 | 3837 | |
@@ -4198,14 +4198,14 @@ discard block |
||
| 4198 | 4198 | $nbMandated = 0; |
| 4199 | 4199 | foreach ($object->lines as $line) { |
| 4200 | 4200 | $res = $line->fetch_product(); |
| 4201 | - if ($res > 0 ) { |
|
| 4202 | - if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) { |
|
| 4201 | + if ($res > 0) { |
|
| 4202 | + if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
|
| 4203 | 4203 | $nbMandated++; |
| 4204 | 4204 | break; |
| 4205 | 4205 | } |
| 4206 | 4206 | } |
| 4207 | 4207 | } |
| 4208 | - if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 4208 | + if ($nbMandated > 0) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 4209 | 4209 | |
| 4210 | 4210 | |
| 4211 | 4211 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); |
@@ -4820,40 +4820,40 @@ discard block |
||
| 4820 | 4820 | } |
| 4821 | 4821 | print '<tr>'; |
| 4822 | 4822 | // Amount HT |
| 4823 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 4824 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4823 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 4824 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4825 | 4825 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4826 | 4826 | // Multicurrency Amount HT |
| 4827 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4827 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4828 | 4828 | } |
| 4829 | 4829 | print '</tr>'; |
| 4830 | 4830 | |
| 4831 | 4831 | print '<tr>'; |
| 4832 | 4832 | // Amount VAT |
| 4833 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 4834 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4833 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 4834 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4835 | 4835 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4836 | 4836 | // Multicurrency Amount VAT |
| 4837 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4837 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4838 | 4838 | } |
| 4839 | 4839 | print '</tr>'; |
| 4840 | 4840 | |
| 4841 | 4841 | // Amount Local Taxes |
| 4842 | 4842 | if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) { |
| 4843 | 4843 | print '<tr>'; |
| 4844 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 4845 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4844 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 4845 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4846 | 4846 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4847 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4847 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4848 | 4848 | } |
| 4849 | 4849 | print '</tr>'; |
| 4850 | 4850 | |
| 4851 | 4851 | if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) { |
| 4852 | 4852 | print '<tr>'; |
| 4853 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 4854 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4853 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 4854 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4855 | 4855 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4856 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4856 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4857 | 4857 | } |
| 4858 | 4858 | print '</tr>'; |
| 4859 | 4859 | } |
@@ -4915,11 +4915,11 @@ discard block |
||
| 4915 | 4915 | |
| 4916 | 4916 | print '<tr>'; |
| 4917 | 4917 | // Amount TTC |
| 4918 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 4919 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 4918 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 4919 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 4920 | 4920 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 4921 | 4921 | // Multicurrency Amount TTC |
| 4922 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 4922 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 4923 | 4923 | } |
| 4924 | 4924 | print '</tr>'; |
| 4925 | 4925 | |
@@ -5318,7 +5318,7 @@ discard block |
||
| 5318 | 5318 | print '</td>'; |
| 5319 | 5319 | print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'; |
| 5320 | 5320 | //print (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code).' '; |
| 5321 | - print price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).'</td><td> </td></tr>'; |
|
| 5321 | + print price(price2num($object->multicurrency_tx * $resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).'</td><td> </td></tr>'; |
|
| 5322 | 5322 | } |
| 5323 | 5323 | |
| 5324 | 5324 | // Retained warranty : usualy use on construction industry |
@@ -5566,7 +5566,7 @@ discard block |
||
| 5566 | 5566 | $langs->load("contracts"); |
| 5567 | 5567 | |
| 5568 | 5568 | if ($usercancreatecontract) { |
| 5569 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>'; |
|
| 5569 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>'; |
|
| 5570 | 5570 | } |
| 5571 | 5571 | } |
| 5572 | 5572 | } |
@@ -697,35 +697,35 @@ discard block |
||
| 697 | 697 | $objp = $this->db->fetch_object($result); |
| 698 | 698 | $line = new FactureLigneRec($this->db); |
| 699 | 699 | |
| 700 | - $line->id = $objp->rowid; |
|
| 700 | + $line->id = $objp->rowid; |
|
| 701 | 701 | $line->rowid = $objp->rowid; |
| 702 | - $line->fk_facture = $objp->fk_facture; |
|
| 703 | - $line->fk_parent_line = $objp->fk_parent_line; |
|
| 702 | + $line->fk_facture = $objp->fk_facture; |
|
| 703 | + $line->fk_parent_line = $objp->fk_parent_line; |
|
| 704 | 704 | $line->desc = $objp->description; // Description line |
| 705 | 705 | $line->description = $objp->description; // Description line |
| 706 | - $line->ref = $objp->product_ref; // Ref product |
|
| 706 | + $line->ref = $objp->product_ref; // Ref product |
|
| 707 | 707 | $line->product_ref = $objp->product_ref; // Ref product |
| 708 | - $line->libelle = $objp->product_label; // deprecated |
|
| 708 | + $line->libelle = $objp->product_label; // deprecated |
|
| 709 | 709 | $line->product_label = $objp->product_label; // Label product |
| 710 | 710 | $line->product_desc = $objp->product_desc; // Description product |
| 711 | 711 | $line->product_type = $objp->product_type; // Type of line |
| 712 | - $line->fk_product_type = $objp->fk_product_type; // Type of product |
|
| 712 | + $line->fk_product_type = $objp->fk_product_type; // Type of product |
|
| 713 | 713 | $line->qty = $objp->qty; |
| 714 | - $line->subprice = $objp->subprice; |
|
| 714 | + $line->subprice = $objp->subprice; |
|
| 715 | 715 | |
| 716 | 716 | $line->label = $objp->custom_label; // @deprecated |
| 717 | 717 | |
| 718 | 718 | $line->vat_src_code = $objp->vat_src_code; |
| 719 | - $line->tva_tx = $objp->tva_tx; |
|
| 719 | + $line->tva_tx = $objp->tva_tx; |
|
| 720 | 720 | $line->localtax1_tx = $objp->localtax1_tx; |
| 721 | 721 | $line->localtax2_tx = $objp->localtax2_tx; |
| 722 | 722 | $line->localtax1_type = $objp->localtax1_type; |
| 723 | 723 | $line->localtax2_type = $objp->localtax2_type; |
| 724 | 724 | $line->remise_percent = $objp->remise_percent; |
| 725 | 725 | //$line->fk_remise_except = $objp->fk_remise_except; |
| 726 | - $line->fk_product = $objp->fk_product; |
|
| 727 | - $line->date_start_fill = $objp->date_start_fill; |
|
| 728 | - $line->date_end_fill = $objp->date_end_fill; |
|
| 726 | + $line->fk_product = $objp->fk_product; |
|
| 727 | + $line->date_start_fill = $objp->date_start_fill; |
|
| 728 | + $line->date_end_fill = $objp->date_end_fill; |
|
| 729 | 729 | $line->info_bits = $objp->info_bits; |
| 730 | 730 | $line->total_ht = $objp->total_ht; |
| 731 | 731 | $line->total_tva = $objp->total_tva; |
@@ -743,13 +743,13 @@ discard block |
||
| 743 | 743 | $line->marge_tx = $marginInfos[1]; |
| 744 | 744 | $line->marque_tx = $marginInfos[2]; |
| 745 | 745 | $line->rang = $objp->rang; |
| 746 | - $line->special_code = $objp->special_code; |
|
| 747 | - $line->fk_unit = $objp->fk_unit; |
|
| 748 | - $line->fk_contract_line = $objp->fk_contract_line; |
|
| 746 | + $line->special_code = $objp->special_code; |
|
| 747 | + $line->fk_unit = $objp->fk_unit; |
|
| 748 | + $line->fk_contract_line = $objp->fk_contract_line; |
|
| 749 | 749 | |
| 750 | 750 | // Ne plus utiliser |
| 751 | - $line->price = $objp->price; |
|
| 752 | - $line->remise = $objp->remise; |
|
| 751 | + $line->price = $objp->price; |
|
| 752 | + $line->remise = $objp->remise; |
|
| 753 | 753 | |
| 754 | 754 | $line->fetch_optionals(); |
| 755 | 755 | |
@@ -1342,7 +1342,7 @@ discard block |
||
| 1342 | 1342 | $facture->fk_fac_rec_source = $facturerec->id; // We will create $facture from this recurring invoice |
| 1343 | 1343 | |
| 1344 | 1344 | $facture->type = self::TYPE_STANDARD; |
| 1345 | - $facture->statut = self::STATUS_DRAFT; // deprecated |
|
| 1345 | + $facture->statut = self::STATUS_DRAFT; // deprecated |
|
| 1346 | 1346 | $facture->status = self::STATUS_DRAFT; |
| 1347 | 1347 | $facture->date = (empty($facturerec->date_when) ? $now : $facturerec->date_when); // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later. |
| 1348 | 1348 | $facture->socid = $facturerec->socid; |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | } |
| 1495 | 1495 | $result .= $linkend; |
| 1496 | 1496 | global $action; |
| 1497 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 1497 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 1498 | 1498 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
| 1499 | 1499 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 1500 | 1500 | if ($reshook > 0) { |
@@ -2247,9 +2247,9 @@ discard block |
||
| 2247 | 2247 | if ($result) { |
| 2248 | 2248 | $objp = $this->db->fetch_object($result); |
| 2249 | 2249 | |
| 2250 | - $this->id = $objp->rowid; |
|
| 2251 | - $this->fk_facture = $objp->fk_facture; |
|
| 2252 | - $this->fk_parent_line = $objp->fk_parent_line; |
|
| 2250 | + $this->id = $objp->rowid; |
|
| 2251 | + $this->fk_facture = $objp->fk_facture; |
|
| 2252 | + $this->fk_parent_line = $objp->fk_parent_line; |
|
| 2253 | 2253 | $this->label = $objp->custom_label; // Label line |
| 2254 | 2254 | $this->desc = $objp->description; // Description line |
| 2255 | 2255 | $this->description = $objp->description; // Description line |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | $this->mode_reglement_id = 0; |
| 476 | 476 | } |
| 477 | 477 | $this->status = self::STATUS_DRAFT; |
| 478 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 478 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 479 | 479 | |
| 480 | 480 | if (!empty($this->multicurrency_code)) { |
| 481 | 481 | // Multicurrency (test on $this->multicurrency_tx because we should take the default rate of multicurrency_code only if not using original rate) |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | |
| 557 | 557 | // Fields always coming from template |
| 558 | 558 | $this->remise_absolue = $_facrec->remise_absolue; |
| 559 | - $this->remise_percent = $_facrec->remise_percent; // TODO deprecated |
|
| 559 | + $this->remise_percent = $_facrec->remise_percent; // TODO deprecated |
|
| 560 | 560 | $this->fk_incoterms = $_facrec->fk_incoterms; |
| 561 | 561 | $this->location_incoterms = $_facrec->location_incoterms; |
| 562 | 562 | |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | $this->mode_reglement_id = 0; |
| 577 | 577 | } |
| 578 | 578 | $this->status = self::STATUS_DRAFT; |
| 579 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 579 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 580 | 580 | |
| 581 | 581 | $this->linked_objects = $_facrec->linkedObjectsIds; |
| 582 | 582 | // We do not add link to template invoice or next invoice will be linked to all generated invoices |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | $sql .= ", fk_soc"; |
| 659 | 659 | $sql .= ", datec"; |
| 660 | 660 | $sql .= ", remise_absolue"; |
| 661 | - $sql .= ", remise_percent"; // TODO deprecated |
|
| 661 | + $sql .= ", remise_percent"; // TODO deprecated |
|
| 662 | 662 | $sql .= ", datef"; |
| 663 | 663 | $sql .= ", date_pointoftax"; |
| 664 | 664 | $sql .= ", note_private"; |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | $sql .= ", ".((int) $socid); |
| 685 | 685 | $sql .= ", '".$this->db->idate($now)."'"; |
| 686 | 686 | $sql .= ", ".($this->remise_absolue > 0 ? $this->remise_absolue : 'NULL'); |
| 687 | - $sql .= ", ".($this->remise_percent > 0 ? $this->remise_percent : 'NULL'); // TODO deprecated |
|
| 687 | + $sql .= ", ".($this->remise_percent > 0 ? $this->remise_percent : 'NULL'); // TODO deprecated |
|
| 688 | 688 | $sql .= ", '".$this->db->idate($this->date)."'"; |
| 689 | 689 | $sql .= ", ".(empty($this->date_pointoftax) ? "null" : "'".$this->db->idate($this->date_pointoftax)."'"); |
| 690 | 690 | $sql .= ", ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : "null"); |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | |
| 824 | 824 | // Complete vat rate with code |
| 825 | 825 | $vatrate = $newinvoiceline->tva_tx; |
| 826 | - if ($newinvoiceline->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$newinvoiceline->vat_src_code.')'; |
|
| 826 | + if ($newinvoiceline->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$newinvoiceline->vat_src_code.')'; |
|
| 827 | 827 | |
| 828 | 828 | $newinvoiceline->fk_parent_line = $fk_parent_line; |
| 829 | 829 | |
@@ -1052,7 +1052,7 @@ discard block |
||
| 1052 | 1052 | $buyprice, |
| 1053 | 1053 | $_facrec->lines[$i]->label, |
| 1054 | 1054 | empty($_facrec->lines[$i]->array_options) ?null:$_facrec->lines[$i]->array_options, |
| 1055 | - 100, // situation percent is undefined on recurring invoice lines |
|
| 1055 | + 100, // situation percent is undefined on recurring invoice lines |
|
| 1056 | 1056 | '', |
| 1057 | 1057 | $_facrec->lines[$i]->fk_unit, |
| 1058 | 1058 | $_facrec->lines[$i]->multicurrency_subprice, |
@@ -1160,11 +1160,11 @@ discard block |
||
| 1160 | 1160 | $facture->cond_reglement_id = $this->cond_reglement_id; |
| 1161 | 1161 | $facture->mode_reglement_id = $this->mode_reglement_id; |
| 1162 | 1162 | $facture->remise_absolue = $this->remise_absolue; |
| 1163 | - $facture->remise_percent = $this->remise_percent; // TODO deprecated |
|
| 1163 | + $facture->remise_percent = $this->remise_percent; // TODO deprecated |
|
| 1164 | 1164 | |
| 1165 | 1165 | $facture->origin = $this->origin; |
| 1166 | 1166 | $facture->origin_id = $this->origin_id; |
| 1167 | - $facture->fk_account = $this->fk_account; |
|
| 1167 | + $facture->fk_account = $this->fk_account; |
|
| 1168 | 1168 | |
| 1169 | 1169 | $facture->lines = $this->lines; // Array of lines of invoice |
| 1170 | 1170 | $facture->situation_counter = $this->situation_counter; |
@@ -1637,7 +1637,7 @@ discard block |
||
| 1637 | 1637 | { |
| 1638 | 1638 | global $conf, $langs, $hookmanager, $action; |
| 1639 | 1639 | |
| 1640 | - if (! in_array($origin->element, array('propal', 'commande'))) { |
|
| 1640 | + if (!in_array($origin->element, array('propal', 'commande'))) { |
|
| 1641 | 1641 | $origin->error = 'ErrorCanOnlyAutomaticallyGenerateADepositFromProposalOrOrder'; |
| 1642 | 1642 | return null; |
| 1643 | 1643 | } |
@@ -1647,7 +1647,7 @@ discard block |
||
| 1647 | 1647 | return null; |
| 1648 | 1648 | } |
| 1649 | 1649 | |
| 1650 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 1650 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 1651 | 1651 | |
| 1652 | 1652 | if ($date > (dol_get_last_hour(dol_now('tzuserrel')) + (empty($conf->global->INVOICE_MAX_FUTURE_DELAY) ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { |
| 1653 | 1653 | $origin->error = 'ErrorDateIsInFuture'; |
@@ -1691,7 +1691,7 @@ discard block |
||
| 1691 | 1691 | $deposit->pos_source = $origin->pos_source; |
| 1692 | 1692 | $deposit->model_pdf = 'crabe'; |
| 1693 | 1693 | |
| 1694 | - $modelByTypeConfName = 'FACTURE_ADDON_PDF_' . $deposit->type; |
|
| 1694 | + $modelByTypeConfName = 'FACTURE_ADDON_PDF_'.$deposit->type; |
|
| 1695 | 1695 | |
| 1696 | 1696 | if (!empty($conf->global->$modelByTypeConfName)) { |
| 1697 | 1697 | $deposit->model_pdf = $conf->global->$modelByTypeConfName; |
@@ -1746,10 +1746,10 @@ discard block |
||
| 1746 | 1746 | continue; |
| 1747 | 1747 | } |
| 1748 | 1748 | $TTotalByTva[$line->tva_tx] += $line->total_ttc; |
| 1749 | - $descriptions[$line->tva_tx] .= '<li>' . (!empty($line->product_ref) ? $line->product_ref . ' - ' : ''); |
|
| 1750 | - $descriptions[$line->tva_tx] .= (!empty($line->product_label) ? $line->product_label . ' - ' : ''); |
|
| 1751 | - $descriptions[$line->tva_tx] .= $langs->trans('Qty') . ' : ' . $line->qty; |
|
| 1752 | - $descriptions[$line->tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($line->total_ht) . '</li>'; |
|
| 1749 | + $descriptions[$line->tva_tx] .= '<li>'.(!empty($line->product_ref) ? $line->product_ref.' - ' : ''); |
|
| 1750 | + $descriptions[$line->tva_tx] .= (!empty($line->product_label) ? $line->product_label.' - ' : ''); |
|
| 1751 | + $descriptions[$line->tva_tx] .= $langs->trans('Qty').' : '.$line->qty; |
|
| 1752 | + $descriptions[$line->tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($line->total_ht).'</li>'; |
|
| 1753 | 1753 | } |
| 1754 | 1754 | |
| 1755 | 1755 | foreach ($TTotalByTva as $tva => &$total) { |
@@ -1773,10 +1773,10 @@ discard block |
||
| 1773 | 1773 | $totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ? |
| 1774 | 1774 | $tva_tx = $lines[$i]->tva_tx; |
| 1775 | 1775 | $amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $origin->deposit_percent) / 100; |
| 1776 | - $descriptions[$tva_tx] .= '<li>' . (!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref . ' - ' : ''); |
|
| 1777 | - $descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label . ' - ' : ''); |
|
| 1778 | - $descriptions[$tva_tx] .= $langs->trans('Qty') . ' : ' . $lines[$i]->qty; |
|
| 1779 | - $descriptions[$tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($lines[$i]->total_ht) . '</li>'; |
|
| 1776 | + $descriptions[$tva_tx] .= '<li>'.(!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref.' - ' : ''); |
|
| 1777 | + $descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label.' - ' : ''); |
|
| 1778 | + $descriptions[$tva_tx] .= $langs->trans('Qty').' : '.$lines[$i]->qty; |
|
| 1779 | + $descriptions[$tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($lines[$i]->total_ht).'</li>'; |
|
| 1780 | 1780 | } |
| 1781 | 1781 | |
| 1782 | 1782 | if ($totalamount == 0) { |
@@ -1791,11 +1791,11 @@ discard block |
||
| 1791 | 1791 | continue; |
| 1792 | 1792 | } |
| 1793 | 1793 | |
| 1794 | - $descline = '(DEPOSIT) ('. $origin->deposit_percent .'%) - '.$origin->ref; |
|
| 1794 | + $descline = '(DEPOSIT) ('.$origin->deposit_percent.'%) - '.$origin->ref; |
|
| 1795 | 1795 | |
| 1796 | 1796 | // Hidden conf |
| 1797 | 1797 | if (!empty($conf->global->INVOICE_DEPOSIT_VARIABLE_MODE_DETAIL_LINES_IN_DESCRIPTION) && !empty($descriptions[$tva])) { |
| 1798 | - $descline .= '<ul>' . $descriptions[$tva] . '</ul>'; |
|
| 1798 | + $descline .= '<ul>'.$descriptions[$tva].'</ul>'; |
|
| 1799 | 1799 | } |
| 1800 | 1800 | |
| 1801 | 1801 | $addlineResult = $deposit->addline( |
@@ -2057,7 +2057,7 @@ discard block |
||
| 2057 | 2057 | $label = $langs->trans("Invoice"); |
| 2058 | 2058 | $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
| 2059 | 2059 | } |
| 2060 | - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
| 2060 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
| 2061 | 2061 | $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; |
| 2062 | 2062 | } |
| 2063 | 2063 | |
@@ -2169,10 +2169,10 @@ discard block |
||
| 2169 | 2169 | $this->id = $obj->rowid; |
| 2170 | 2170 | $this->entity = $obj->entity; |
| 2171 | 2171 | |
| 2172 | - $this->ref = $obj->ref; |
|
| 2173 | - $this->ref_client = $obj->ref_client; |
|
| 2174 | - $this->ref_customer = $obj->ref_client; |
|
| 2175 | - $this->ref_ext = $obj->ref_ext; |
|
| 2172 | + $this->ref = $obj->ref; |
|
| 2173 | + $this->ref_client = $obj->ref_client; |
|
| 2174 | + $this->ref_customer = $obj->ref_client; |
|
| 2175 | + $this->ref_ext = $obj->ref_ext; |
|
| 2176 | 2176 | $this->type = $obj->type; |
| 2177 | 2177 | $this->date = $this->db->jdate($obj->df); |
| 2178 | 2178 | $this->date_pointoftax = $this->db->jdate($obj->date_pointoftax); |
@@ -2180,7 +2180,7 @@ discard block |
||
| 2180 | 2180 | $this->date_validation = $this->db->jdate($obj->datev); |
| 2181 | 2181 | $this->date_modification = $this->db->jdate($obj->datem); |
| 2182 | 2182 | $this->datem = $this->db->jdate($obj->datem); |
| 2183 | - $this->remise_percent = $obj->remise_percent; // TODO deprecated |
|
| 2183 | + $this->remise_percent = $obj->remise_percent; // TODO deprecated |
|
| 2184 | 2184 | $this->remise_absolue = $obj->remise_absolue; |
| 2185 | 2185 | $this->total_ht = $obj->total_ht; |
| 2186 | 2186 | $this->total_tva = $obj->total_tva; |
@@ -2198,7 +2198,7 @@ discard block |
||
| 2198 | 2198 | $this->fk_project = $obj->fk_project; |
| 2199 | 2199 | $this->project = null; // Clear if another value was already set by fetch_projet |
| 2200 | 2200 | |
| 2201 | - $this->statut = $obj->status; // deprecated |
|
| 2201 | + $this->statut = $obj->status; // deprecated |
|
| 2202 | 2202 | $this->status = $obj->status; |
| 2203 | 2203 | |
| 2204 | 2204 | $this->date_lim_reglement = $this->db->jdate($obj->dlr); |
@@ -2331,7 +2331,7 @@ discard block |
||
| 2331 | 2331 | $line->ref = $objp->product_ref; // Ref product |
| 2332 | 2332 | $line->product_ref = $objp->product_ref; // Ref product |
| 2333 | 2333 | $line->libelle = $objp->product_label; // deprecated |
| 2334 | - $line->product_label = $objp->product_label; // Label product |
|
| 2334 | + $line->product_label = $objp->product_label; // Label product |
|
| 2335 | 2335 | $line->product_desc = $objp->product_desc; // Description product |
| 2336 | 2336 | $line->fk_product_type = $objp->fk_product_type; // Type of product |
| 2337 | 2337 | $line->qty = $objp->qty; |
@@ -2510,7 +2510,7 @@ discard block |
||
| 2510 | 2510 | $sql .= " date_pointoftax=".(strval($this->date_pointoftax) != '' ? "'".$this->db->idate($this->date_pointoftax)."'" : 'null').","; |
| 2511 | 2511 | $sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; |
| 2512 | 2512 | $sql .= " paye=".(isset($this->paye) ? $this->db->escape($this->paye) : 0).","; |
| 2513 | - $sql .= " remise_percent=".(isset($this->remise_percent) ? $this->db->escape($this->remise_percent) : "null").","; // TODO deprecated |
|
| 2513 | + $sql .= " remise_percent=".(isset($this->remise_percent) ? $this->db->escape($this->remise_percent) : "null").","; // TODO deprecated |
|
| 2514 | 2514 | $sql .= " remise_absolue=".(isset($this->remise_absolue) ? $this->db->escape($this->remise_absolue) : "null").","; |
| 2515 | 2515 | $sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").","; |
| 2516 | 2516 | $sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").","; |
@@ -2624,7 +2624,7 @@ discard block |
||
| 2624 | 2624 | $facligne->rang = 1; |
| 2625 | 2625 | $linecount = count($this->lines); |
| 2626 | 2626 | for ($ii = 1; $ii <= $linecount; $ii++) { |
| 2627 | - $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1); |
|
| 2627 | + $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); |
|
| 2628 | 2628 | } |
| 2629 | 2629 | } |
| 2630 | 2630 | |
@@ -3540,7 +3540,7 @@ discard block |
||
| 3540 | 3540 | // Set new ref and define current status |
| 3541 | 3541 | if (!$error) { |
| 3542 | 3542 | $this->ref = $num; |
| 3543 | - $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 3543 | + $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 3544 | 3544 | $this->status = self::STATUS_VALIDATED; |
| 3545 | 3545 | $this->date_validation = $now; |
| 3546 | 3546 | $i = 0; |
@@ -3685,7 +3685,7 @@ discard block |
||
| 3685 | 3685 | |
| 3686 | 3686 | if ($error == 0) { |
| 3687 | 3687 | $old_statut = $this->status; |
| 3688 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 3688 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 3689 | 3689 | $this->status = self::STATUS_DRAFT; |
| 3690 | 3690 | |
| 3691 | 3691 | // Call trigger |
@@ -4016,7 +4016,7 @@ discard block |
||
| 4016 | 4016 | return -2; |
| 4017 | 4017 | } |
| 4018 | 4018 | } else { |
| 4019 | - $this->errors[]='status of invoice must be Draft to allow use of ->addline()'; |
|
| 4019 | + $this->errors[] = 'status of invoice must be Draft to allow use of ->addline()'; |
|
| 4020 | 4020 | dol_syslog(get_class($this)."::addline status of invoice must be Draft to allow use of ->addline()", LOG_ERR); |
| 4021 | 4021 | return -3; |
| 4022 | 4022 | } |
@@ -5663,14 +5663,14 @@ discard block |
||
| 5663 | 5663 | if (!empty($paymentmode) && $paymentmode != 'all') { |
| 5664 | 5664 | $sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp"; |
| 5665 | 5665 | } |
| 5666 | - $sql .= " WHERE f.paye = 0"; // Only unpaid |
|
| 5667 | - $sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status |
|
| 5666 | + $sql .= " WHERE f.paye = 0"; // Only unpaid |
|
| 5667 | + $sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status |
|
| 5668 | 5668 | if ($datetouse == 'invoicedate') { |
| 5669 | 5669 | $sql .= " AND f.datef = '".$this->db->idate($tmpidate, 'gmt')."'"; |
| 5670 | 5670 | } else { |
| 5671 | 5671 | $sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'"; |
| 5672 | 5672 | } |
| 5673 | - $sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch process only one company (no sharing) |
|
| 5673 | + $sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch process only one company (no sharing) |
|
| 5674 | 5674 | if (!empty($paymentmode) && $paymentmode != 'all') { |
| 5675 | 5675 | $sql .= " AND f.fk_mode_reglement = cp.id AND cp.code = '".$this->db->escape($paymentmode)."'"; |
| 5676 | 5676 | } |
@@ -5878,7 +5878,7 @@ discard block |
||
| 5878 | 5878 | $actioncomm->create($user); |
| 5879 | 5879 | } |
| 5880 | 5880 | |
| 5881 | - $this->db->commit(); // We always commit |
|
| 5881 | + $this->db->commit(); // We always commit |
|
| 5882 | 5882 | } |
| 5883 | 5883 | |
| 5884 | 5884 | if ($errormesg) { |
@@ -5914,7 +5914,7 @@ discard block |
||
| 5914 | 5914 | // get date of last validated invoices of same type |
| 5915 | 5915 | $sql = "SELECT datef"; |
| 5916 | 5916 | $sql .= " FROM ".MAIN_DB_PREFIX."facture"; |
| 5917 | - $sql .= " WHERE type = " . (int) $this->type ; |
|
| 5917 | + $sql .= " WHERE type = ".(int) $this->type; |
|
| 5918 | 5918 | $sql .= " AND date_valid IS NOT NULL"; |
| 5919 | 5919 | $sql .= " AND entity IN (".getEntity('invoice').")"; |
| 5920 | 5920 | $sql .= " ORDER BY datef DESC LIMIT 1"; |
@@ -6095,7 +6095,7 @@ discard block |
||
| 6095 | 6095 | $objp = $this->db->fetch_object($result); |
| 6096 | 6096 | |
| 6097 | 6097 | if (!$objp) { |
| 6098 | - $this->error = 'InvoiceLine with id '. $rowid .' not found sql='.$sql; |
|
| 6098 | + $this->error = 'InvoiceLine with id '.$rowid.' not found sql='.$sql; |
|
| 6099 | 6099 | return 0; |
| 6100 | 6100 | } |
| 6101 | 6101 | |