@@ -341,9 +341,9 @@ |
||
| 341 | 341 | $product_static->status_buy = $objp->tobuy; |
| 342 | 342 | $product_static->status_batch = $objp->tobatch; |
| 343 | 343 | |
| 344 | - $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'read'); |
|
| 344 | + $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'read'); |
|
| 345 | 345 | if ($product_static->isService()) { |
| 346 | - $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'read'); |
|
| 346 | + $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('service', 'service_advance', 'read_prices') : $user->hasRight('service', 'read'); |
|
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | // Multilangs |
@@ -288,7 +288,7 @@ |
||
| 288 | 288 | print '<tr class="oddeven" height="24">'; |
| 289 | 289 | print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>'; |
| 290 | 290 | print '<td class="right">'.$val['nb'].'</td>'; |
| 291 | - print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']): "0").'%</td>'; |
|
| 291 | + print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']) : "0").'%</td>'; |
|
| 292 | 292 | print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>'; |
| 293 | 293 | print '<td class="right opacitylow" style="'.((!isset($val['total_diff']) || $val['total_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['total_diff']) ? round($val['total_diff']) : "0").'%</td>'; |
| 294 | 294 | print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>'; |
@@ -357,7 +357,7 @@ |
||
| 357 | 357 | if (isModEnabled('contrat')) { |
| 358 | 358 | $formcontract = new FormContract($db); |
| 359 | 359 | print "<tr><td>".$langs->trans("Contract")."</td><td>"; |
| 360 | - $contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contract) ? $object->fk_contract : 0) ; |
|
| 360 | + $contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contract) ? $object->fk_contract : 0); |
|
| 361 | 361 | $numcontract = $formcontract->select_contract($object->thirdparty->id, $contractid, 'contracttid'); |
| 362 | 362 | print "</td></tr>"; |
| 363 | 363 | } |
@@ -3640,9 +3640,12 @@ |
||
| 3640 | 3640 | |
| 3641 | 3641 | $parameters = array(); |
| 3642 | 3642 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 3643 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 3644 | - if (empty($reshook)) |
|
| 3645 | - $object->formAddObjectLine(1, $societe, $mysoc); |
|
| 3643 | + if ($reshook < 0) { |
|
| 3644 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 3645 | + } |
|
| 3646 | + if (empty($reshook)) { |
|
| 3647 | + $object->formAddObjectLine(1, $societe, $mysoc); |
|
| 3648 | + } |
|
| 3646 | 3649 | } |
| 3647 | 3650 | } |
| 3648 | 3651 | |
@@ -751,7 +751,7 @@ discard block |
||
| 751 | 751 | $error++; |
| 752 | 752 | } |
| 753 | 753 | |
| 754 | - $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 |
|
| 754 | + $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 |
|
| 755 | 755 | $datedue = dol_mktime(0, 0, 0, GETPOST('echmonth', 'int'), GETPOST('echday', 'int'), GETPOST('echyear', 'int'), 'tzserver'); |
| 756 | 756 | //var_dump($dateinvoice.' '.dol_print_date($dateinvoice, 'dayhour')); |
| 757 | 757 | //var_dump(dol_now('tzuserrel').' '.dol_get_last_hour(dol_now('tzuserrel')).' '.dol_print_date(dol_now('tzuserrel'),'dayhour').' '.dol_print_date(dol_get_last_hour(dol_now('tzuserrel')), 'dayhour')); |
@@ -789,7 +789,7 @@ discard block |
||
| 789 | 789 | $object->ref = GETPOST('ref', 'alphanohtml'); |
| 790 | 790 | $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); |
| 791 | 791 | $object->socid = GETPOST('socid', 'int'); |
| 792 | - $object->libelle = GETPOST('label', 'alphanohtml'); // deprecated |
|
| 792 | + $object->libelle = GETPOST('label', 'alphanohtml'); // deprecated |
|
| 793 | 793 | $object->label = GETPOST('label', 'alphanohtml'); |
| 794 | 794 | $object->date = $dateinvoice; |
| 795 | 795 | $object->date_echeance = $datedue; |
@@ -1027,28 +1027,28 @@ discard block |
||
| 1027 | 1027 | $tmpproject = GETPOST('projectid', 'int'); |
| 1028 | 1028 | |
| 1029 | 1029 | // Creation invoice |
| 1030 | + $object->socid = GETPOST('socid', 'int'); |
|
| 1031 | + $object->type = GETPOST('type', 'alphanohtml'); |
|
| 1032 | + $object->subtype = GETPOST('subtype', 'alphanohtml'); |
|
| 1033 | + $object->ref = GETPOST('ref', 'alphanohtml'); |
|
| 1034 | + $object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml'); |
|
| 1030 | 1035 | $object->socid = GETPOST('socid', 'int'); |
| 1031 | - $object->type = GETPOST('type', 'alphanohtml'); |
|
| 1032 | - $object->subtype = GETPOST('subtype', 'alphanohtml'); |
|
| 1033 | - $object->ref = GETPOST('ref', 'alphanohtml'); |
|
| 1034 | - $object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml'); |
|
| 1035 | - $object->socid = GETPOST('socid', 'int'); |
|
| 1036 | - $object->libelle = GETPOST('label', 'alphanohtml'); // deprecated |
|
| 1036 | + $object->libelle = GETPOST('label', 'alphanohtml'); // deprecated |
|
| 1037 | 1037 | $object->label = GETPOST('label', 'alphanohtml'); |
| 1038 | - $object->date = $dateinvoice; |
|
| 1039 | - $object->date_echeance = $datedue; |
|
| 1040 | - $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
| 1041 | - $object->note_private = GETPOST('note_private', 'restricthtml'); |
|
| 1038 | + $object->date = $dateinvoice; |
|
| 1039 | + $object->date_echeance = $datedue; |
|
| 1040 | + $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
| 1041 | + $object->note_private = GETPOST('note_private', 'restricthtml'); |
|
| 1042 | 1042 | $object->cond_reglement_id = GETPOST('cond_reglement_id'); |
| 1043 | 1043 | $object->mode_reglement_id = GETPOST('mode_reglement_id'); |
| 1044 | 1044 | $object->fk_account = GETPOST('fk_account', 'int'); |
| 1045 | 1045 | $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
| 1046 | 1046 | $object->fk_project = ($tmpproject > 0) ? $tmpproject : null; |
| 1047 | - $object->fk_incoterms = GETPOST('incoterm_id', 'int'); |
|
| 1047 | + $object->fk_incoterms = GETPOST('incoterm_id', 'int'); |
|
| 1048 | 1048 | $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); |
| 1049 | 1049 | $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); |
| 1050 | - $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); |
|
| 1051 | - $object->transport_mode_id = GETPOST('transport_mode_id'); |
|
| 1050 | + $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); |
|
| 1051 | + $object->transport_mode_id = GETPOST('transport_mode_id'); |
|
| 1052 | 1052 | |
| 1053 | 1053 | // Auto calculation of date due if not filled by user |
| 1054 | 1054 | if (empty($object->date_echeance)) { |
@@ -1387,7 +1387,7 @@ discard block |
||
| 1387 | 1387 | // Edit line |
| 1388 | 1388 | $db->begin(); |
| 1389 | 1389 | |
| 1390 | - if (! $object->fetch($id) > 0) { |
|
| 1390 | + if (!$object->fetch($id) > 0) { |
|
| 1391 | 1391 | dol_print_error($db); |
| 1392 | 1392 | } |
| 1393 | 1393 | $object->fetch_thirdparty(); |
@@ -1531,7 +1531,7 @@ discard block |
||
| 1531 | 1531 | $idprod = GETPOST('idprod', 'int'); |
| 1532 | 1532 | } |
| 1533 | 1533 | |
| 1534 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 1534 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 1535 | 1535 | |
| 1536 | 1536 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
| 1537 | 1537 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -2215,7 +2215,7 @@ discard block |
||
| 2215 | 2215 | print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
| 2216 | 2216 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 2217 | 2217 | print '<input type="hidden" name="action" value="add">'; |
| 2218 | - 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 |
|
| 2218 | + 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 |
|
| 2219 | 2219 | |
| 2220 | 2220 | if (!empty($societe->id) && $societe->id > 0) { |
| 2221 | 2221 | print '<input type="hidden" name="socid" value="'.$societe->id.'">'."\n"; |
@@ -2294,7 +2294,7 @@ discard block |
||
| 2294 | 2294 | |
| 2295 | 2295 | $sql = 'SELECT r.rowid, r.titre as title, r.total_ttc'; |
| 2296 | 2296 | $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_rec as r'; |
| 2297 | - $sql .= ' WHERE r.fk_soc = '. (int) $invoice_predefined->socid; |
|
| 2297 | + $sql .= ' WHERE r.fk_soc = '.(int) $invoice_predefined->socid; |
|
| 2298 | 2298 | |
| 2299 | 2299 | $resql = $db->query($sql); |
| 2300 | 2300 | if ($resql) { |
@@ -2352,7 +2352,7 @@ discard block |
||
| 2352 | 2352 | |
| 2353 | 2353 | // Standard invoice |
| 2354 | 2354 | print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; |
| 2355 | - $tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOST('type', 'int')? '' : 'checked').'> '; |
|
| 2355 | + $tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOST('type', 'int') ? '' : 'checked').'> '; |
|
| 2356 | 2356 | $desc = $form->textwithpicto($tmp.'<label for="radio_standard">'.$langs->trans("InvoiceStandardAsk").'</label>', $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3); |
| 2357 | 2357 | print $desc; |
| 2358 | 2358 | print '</div></div>'; |
@@ -2361,7 +2361,7 @@ discard block |
||
| 2361 | 2361 | // Deposit - Down payment |
| 2362 | 2362 | if (empty($conf->global->INVOICE_DISABLE_DEPOSIT)) { |
| 2363 | 2363 | print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; |
| 2364 | - $tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> '; |
|
| 2364 | + $tmp = '<input type="radio" id="radio_deposit" name="type" value="3"'.(GETPOST('type') == 3 ? ' checked' : '').'> '; |
|
| 2365 | 2365 | print '<script type="text/javascript"> |
| 2366 | 2366 | jQuery(document).ready(function() { |
| 2367 | 2367 | jQuery("#typestandardinvoice, #valuestandardinvoice").click(function() { |
@@ -2407,7 +2407,7 @@ discard block |
||
| 2407 | 2407 | print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit', 'aZ09'), 0, 0, 0, '', 1); |
| 2408 | 2408 | print '</td>'; |
| 2409 | 2409 | print '<td class="nowrap" style="padding-left: 5px">'; |
| 2410 | - print '<span class="opacitymedium paddingleft">'.$langs->trans("AmountOrPercent").'</span><input type="text" id="valuedeposit" name="valuedeposit" class="width75 right" value="' . GETPOST('valuedeposit', 'int') . '"/>'; |
|
| 2410 | + print '<span class="opacitymedium paddingleft">'.$langs->trans("AmountOrPercent").'</span><input type="text" id="valuedeposit" name="valuedeposit" class="width75 right" value="'.GETPOST('valuedeposit', 'int').'"/>'; |
|
| 2411 | 2411 | print '</td>'; |
| 2412 | 2412 | } |
| 2413 | 2413 | print '</tr></table>'; |
@@ -2562,7 +2562,7 @@ discard block |
||
| 2562 | 2562 | if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) { |
| 2563 | 2563 | $tmp = '<input type="radio" name="type" id="radio_creditnote" value="0" disabled> '; |
| 2564 | 2564 | } else { |
| 2565 | - $tmp='<input type="radio" name="type" id="radio_creditnote" value="2"> '; |
|
| 2565 | + $tmp = '<input type="radio" name="type" id="radio_creditnote" value="2"> '; |
|
| 2566 | 2566 | } |
| 2567 | 2567 | $text = $tmp.$langs->trans("InvoiceAvoir").' '; |
| 2568 | 2568 | $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromSupplierThird").')</span> '; |
@@ -2655,7 +2655,7 @@ discard block |
||
| 2655 | 2655 | |
| 2656 | 2656 | // Vat reverse-charge by default |
| 2657 | 2657 | if (!empty($conf->global->ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE)) { |
| 2658 | - print '<tr><td>' . $langs->trans('VATReverseCharge') . '</td><td>'; |
|
| 2658 | + print '<tr><td>'.$langs->trans('VATReverseCharge').'</td><td>'; |
|
| 2659 | 2659 | // Try to propose to use VAT reverse charge even if the VAT reverse charge is not activated in the supplier card, if this corresponds to the context of use, the activation is proposed |
| 2660 | 2660 | if ($vat_reverse_charge == 1 || $societe->vat_reverse_charge == 1 || ($societe->country_code != 'FR' && isInEEC($societe) && !empty($societe->tva_intra))) { |
| 2661 | 2661 | $vat_reverse_charge = 1; |
@@ -2663,7 +2663,7 @@ discard block |
||
| 2663 | 2663 | $vat_reverse_charge = 0; |
| 2664 | 2664 | } |
| 2665 | 2665 | |
| 2666 | - print '<input type="checkbox" name="vat_reverse_charge"'. (!empty($vat_reverse_charge) ? ' checked ' : '') . '>'; |
|
| 2666 | + print '<input type="checkbox" name="vat_reverse_charge"'.(!empty($vat_reverse_charge) ? ' checked ' : '').'>'; |
|
| 2667 | 2667 | print '</td></tr>'; |
| 2668 | 2668 | } |
| 2669 | 2669 | |
@@ -3218,7 +3218,7 @@ discard block |
||
| 3218 | 3218 | $facavoir->fetch($id); |
| 3219 | 3219 | $invoicecredits[] = $facavoir->getNomUrl(1); |
| 3220 | 3220 | } |
| 3221 | - print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits); |
|
| 3221 | + print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir").(count($invoicecredits) ? ' ' : '').implode(',', $invoicecredits); |
|
| 3222 | 3222 | print '</span>'; |
| 3223 | 3223 | } |
| 3224 | 3224 | if (isset($objectidnext) && $objectidnext > 0) { |
@@ -3414,12 +3414,12 @@ discard block |
||
| 3414 | 3414 | print '<input type="hidden" name="action" value="setvatreversecharge">'; |
| 3415 | 3415 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 3416 | 3416 | |
| 3417 | - print '<input type="checkbox" name="vat_reverse_charge"' . ($object->vat_reverse_charge == '1' ? ' checked ' : '') . '>'; |
|
| 3417 | + print '<input type="checkbox" name="vat_reverse_charge"'.($object->vat_reverse_charge == '1' ? ' checked ' : '').'>'; |
|
| 3418 | 3418 | |
| 3419 | 3419 | print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; |
| 3420 | 3420 | print '</form>'; |
| 3421 | 3421 | } else { |
| 3422 | - print '<input type="checkbox" name="vat_reverse_charge"'. ($object->vat_reverse_charge == '1' ? ' checked ' : '') . ' disabled>'; |
|
| 3422 | + print '<input type="checkbox" name="vat_reverse_charge"'.($object->vat_reverse_charge == '1' ? ' checked ' : '').' disabled>'; |
|
| 3423 | 3423 | } |
| 3424 | 3424 | print '</td></tr>'; |
| 3425 | 3425 | } |
@@ -3480,15 +3480,15 @@ discard block |
||
| 3480 | 3480 | print '<table class="border tableforfield centpercent">'; |
| 3481 | 3481 | |
| 3482 | 3482 | print '<tr>'; |
| 3483 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 3484 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3483 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 3484 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3485 | 3485 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3486 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3486 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3487 | 3487 | } |
| 3488 | 3488 | print '</tr>'; |
| 3489 | 3489 | |
| 3490 | 3490 | print '<tr>'; |
| 3491 | - print '<td>' . $langs->trans('AmountVAT') . '</td>'; |
|
| 3491 | + print '<td>'.$langs->trans('AmountVAT').'</td>'; |
|
| 3492 | 3492 | print '<td class="nowrap amountcard right">'; |
| 3493 | 3493 | if (GETPOST('calculationrule')) { |
| 3494 | 3494 | $calculationrule = GETPOST('calculationrule', 'alpha'); |
@@ -3502,40 +3502,40 @@ discard block |
||
| 3502 | 3502 | } |
| 3503 | 3503 | // Show link for "recalculate" |
| 3504 | 3504 | if ($object->getVentilExportCompta() == 0) { |
| 3505 | - $s = '<span class="hideonsmartphone opacitymedium">' . $langs->trans("ReCalculate") . ' </span>'; |
|
| 3506 | - $s .= '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=calculate&calculationrule=totalofround">' . $langs->trans("Mode1") . '</a>'; |
|
| 3505 | + $s = '<span class="hideonsmartphone opacitymedium">'.$langs->trans("ReCalculate").' </span>'; |
|
| 3506 | + $s .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=calculate&calculationrule=totalofround">'.$langs->trans("Mode1").'</a>'; |
|
| 3507 | 3507 | $s .= ' / '; |
| 3508 | - $s .= '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=calculate&calculationrule=roundoftotal">' . $langs->trans("Mode2") . '</a>'; |
|
| 3508 | + $s .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=calculate&calculationrule=roundoftotal">'.$langs->trans("Mode2").'</a>'; |
|
| 3509 | 3509 | print '<div class="inline-block">'; |
| 3510 | - print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc", $calculationrulenum) . '<br>' . $langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('', 'help'), '', 3, '', 0, 'recalculate'); |
|
| 3510 | + print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc", $calculationrulenum).'<br>'.$langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('', 'help'), '', 3, '', 0, 'recalculate'); |
|
| 3511 | 3511 | print ' '; |
| 3512 | 3512 | print '</div>'; |
| 3513 | 3513 | } |
| 3514 | 3514 | print price($object->total_tva, 1, $langs, 0, -1, -1, $conf->currency); |
| 3515 | 3515 | print '</td>'; |
| 3516 | 3516 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3517 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3517 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3518 | 3518 | } |
| 3519 | 3519 | print '</tr>'; |
| 3520 | 3520 | |
| 3521 | 3521 | if ($societe->localtax1_assuj == "1") { //Localtax1 |
| 3522 | 3522 | print '<tr>'; |
| 3523 | - print '<td>' . $langs->transcountry("AmountLT1", $societe->country_code) . '</td>'; |
|
| 3524 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3523 | + print '<td>'.$langs->transcountry("AmountLT1", $societe->country_code).'</td>'; |
|
| 3524 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3525 | 3525 | print '</tr>'; |
| 3526 | 3526 | } |
| 3527 | 3527 | if ($societe->localtax2_assuj == "1") { //Localtax2 |
| 3528 | 3528 | print '<tr>'; |
| 3529 | - print '<td>' . $langs->transcountry("AmountLT2", $societe->country_code) . '</td>'; |
|
| 3530 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3529 | + print '<td>'.$langs->transcountry("AmountLT2", $societe->country_code).'</td>'; |
|
| 3530 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3531 | 3531 | print '</tr>'; |
| 3532 | 3532 | } |
| 3533 | 3533 | |
| 3534 | 3534 | print '<tr>'; |
| 3535 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 3536 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3535 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 3536 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3537 | 3537 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3538 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3538 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3539 | 3539 | } |
| 3540 | 3540 | print '</tr>'; |
| 3541 | 3541 | |
@@ -3841,7 +3841,7 @@ discard block |
||
| 3841 | 3841 | print '<tr><td colspan="'.$nbcols.'" class="right">'; |
| 3842 | 3842 | print '<span class="opacitymedium">'; |
| 3843 | 3843 | print $langs->trans('RemainderToPayBackMulticurrency'); |
| 3844 | - if ($resteapayeraffiche> 0) { |
|
| 3844 | + if ($resteapayeraffiche > 0) { |
|
| 3845 | 3845 | print ' ('.$langs->trans('NegativeIfExcessRefunded').')'; |
| 3846 | 3846 | } |
| 3847 | 3847 | print '</span>'; |
@@ -4070,7 +4070,7 @@ discard block |
||
| 4070 | 4070 | } |
| 4071 | 4071 | |
| 4072 | 4072 | // Clone as predefined / Create template |
| 4073 | - if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut == 0 && $usercancreate) { |
|
| 4073 | + if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut == 0 && $usercancreate) { |
|
| 4074 | 4074 | if (!$objectidnext && count($object->lines) > 0) { |
| 4075 | 4075 | print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card-rec.php?facid='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>'; |
| 4076 | 4076 | } |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1); |
| 127 | 127 | |
| 128 | 128 | // Amount |
| 129 | - $morehtmlref .= '<br>'.$langs->trans('Amount').' : '. price($object->amount, '', $langs, 0, 0, -1, $conf->currency); |
|
| 129 | + $morehtmlref .= '<br>'.$langs->trans('Amount').' : '.price($object->amount, '', $langs, 0, 0, -1, $conf->currency); |
|
| 130 | 130 | |
| 131 | 131 | $allow_delete = 1; |
| 132 | 132 | // Bank account |
@@ -687,8 +687,9 @@ discard block |
||
| 687 | 687 | $newlang = ''; |
| 688 | 688 | if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { |
| 689 | 689 | $newlang = $object->thirdparty->default_lang; |
| 690 | - if (GETPOST('lang_id', 'aZ09')) |
|
| 691 | - $newlang = GETPOST('lang_id', 'aZ09'); |
|
| 690 | + if (GETPOST('lang_id', 'aZ09')) { |
|
| 691 | + $newlang = GETPOST('lang_id', 'aZ09'); |
|
| 692 | + } |
|
| 692 | 693 | } |
| 693 | 694 | if (!empty($newlang)) { |
| 694 | 695 | $outputlangs = new Translate("", $conf); |
@@ -2427,9 +2428,12 @@ discard block |
||
| 2427 | 2428 | |
| 2428 | 2429 | $parameters = array(); |
| 2429 | 2430 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 2430 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 2431 | - if (empty($reshook)) |
|
| 2432 | - $object->formAddObjectLine(1, $societe, $mysoc); |
|
| 2431 | + if ($reshook < 0) { |
|
| 2432 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 2433 | + } |
|
| 2434 | + if (empty($reshook)) { |
|
| 2435 | + $object->formAddObjectLine(1, $societe, $mysoc); |
|
| 2436 | + } |
|
| 2433 | 2437 | } |
| 2434 | 2438 | } |
| 2435 | 2439 | print '</table>'; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $result = restrictedArea($user, 'fournisseur', $object, 'commande_fournisseur', 'commande', 'fk_soc', 'rowid', $isdraft); |
| 138 | 138 | |
| 139 | 139 | // Common permissions |
| 140 | -$usercanread = ($user->hasRight("fournisseur", "commande", "lire") || $user->hasRight("supplier_order", "lire")); |
|
| 140 | +$usercanread = ($user->hasRight("fournisseur", "commande", "lire") || $user->hasRight("supplier_order", "lire")); |
|
| 141 | 141 | $usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); |
| 142 | 142 | $usercandelete = (($user->hasRight("fournisseur", "commande", "supprimer") || $user->hasRight("supplier_order", "supprimer")) || ($usercancreate && isset($object->statut) && $object->statut == $object::STATUS_DRAFT)); |
| 143 | 143 | |
@@ -145,9 +145,9 @@ discard block |
||
| 145 | 145 | $usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight("fournisseur", "supplier_order_advance", "validate"))); |
| 146 | 146 | |
| 147 | 147 | // Additional area permissions |
| 148 | -$usercanapprove = $user->hasRight("fournisseur", "commande", "approuver"); |
|
| 149 | -$usercanapprovesecond = $user->hasRight("fournisseur", "commande", "approve2"); |
|
| 150 | -$usercanorder = $user->hasRight("fournisseur", "commande", "commander"); |
|
| 148 | +$usercanapprove = $user->hasRight("fournisseur", "commande", "approuver"); |
|
| 149 | +$usercanapprovesecond = $user->hasRight("fournisseur", "commande", "approve2"); |
|
| 150 | +$usercanorder = $user->hasRight("fournisseur", "commande", "commander"); |
|
| 151 | 151 | if (empty($conf->reception->enabled)) { |
| 152 | 152 | $usercanreceive = $user->hasRight("fournisseur", "commande", "receptionner"); |
| 153 | 153 | } else { |
@@ -156,8 +156,8 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | // Permissions for includes |
| 158 | 158 | $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php |
| 159 | -$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 160 | -$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php |
|
| 159 | +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 160 | +$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php |
|
| 161 | 161 | $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php |
| 162 | 162 | |
| 163 | 163 | // Project permission |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | if (empty($reshook)) { |
| 183 | - $backurlforlist = DOL_URL_ROOT.'/fourn/commande/list.php'.($socid > 0 ? '?socid='.((int) $socid) : ''); |
|
| 183 | + $backurlforlist = DOL_URL_ROOT.'/fourn/commande/list.php'.($socid > 0 ? '?socid='.((int) $socid) : ''); |
|
| 184 | 184 | |
| 185 | 185 | if (empty($backtopage) || ($cancel && empty($id))) { |
| 186 | 186 | if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | $idprod = GETPOST('idprod', 'int'); |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 438 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 439 | 439 | |
| 440 | 440 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
| 441 | 441 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | |
| 554 | 554 | //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time |
| 555 | 555 | if (trim($product_desc) == trim($desc) && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
| 556 | - $product_desc=''; |
|
| 556 | + $product_desc = ''; |
|
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -1240,7 +1240,7 @@ discard block |
||
| 1240 | 1240 | $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); |
| 1241 | 1241 | $object->fk_account = GETPOST('fk_account', 'int'); |
| 1242 | 1242 | $object->note_private = GETPOST('note_private', 'restricthtml'); |
| 1243 | - $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
| 1243 | + $object->note_public = GETPOST('note_public', 'restricthtml'); |
|
| 1244 | 1244 | $object->delivery_date = $datelivraison; |
| 1245 | 1245 | $object->fk_incoterms = GETPOST('incoterm_id', 'int'); |
| 1246 | 1246 | $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); |
@@ -1629,7 +1629,7 @@ discard block |
||
| 1629 | 1629 | $cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0)); |
| 1630 | 1630 | $mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); |
| 1631 | 1631 | $fk_account = (!empty($objectsrc->fk_account) ? $objectsrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); |
| 1632 | - $availability_id = (!empty($objectsrc->availability_id) ? $objectsrc->availability_id : (!empty($soc->availability_id) ? $soc->availability_id : 0)); |
|
| 1632 | + $availability_id = (!empty($objectsrc->availability_id) ? $objectsrc->availability_id : (!empty($soc->availability_id) ? $soc->availability_id : 0)); |
|
| 1633 | 1633 | $shipping_method_id = (!empty($objectsrc->shipping_method_id) ? $objectsrc->shipping_method_id : (!empty($soc->shipping_method_id) ? $soc->shipping_method_id : 0)); |
| 1634 | 1634 | $demand_reason_id = (!empty($objectsrc->demand_reason_id) ? $objectsrc->demand_reason_id : (!empty($soc->demand_reason_id) ? $soc->demand_reason_id : 0)); |
| 1635 | 1635 | //$remise_percent = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_supplier_percent) ? $soc->remise_supplier_percent : 0)); |
@@ -1744,7 +1744,7 @@ discard block |
||
| 1744 | 1744 | // Payment term |
| 1745 | 1745 | print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>'; |
| 1746 | 1746 | print img_picto('', 'payment', 'class="pictofixedwidth"'); |
| 1747 | - print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') && GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); |
|
| 1747 | + print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') && GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); |
|
| 1748 | 1748 | print '</td></tr>'; |
| 1749 | 1749 | |
| 1750 | 1750 | // Payment mode |
@@ -1994,7 +1994,7 @@ discard block |
||
| 1994 | 1994 | 'morecss' => 'minwidth300' |
| 1995 | 1995 | ) |
| 1996 | 1996 | ); |
| 1997 | - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1); |
|
| 1997 | + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1); |
|
| 1998 | 1998 | } |
| 1999 | 1999 | |
| 2000 | 2000 | // Confirmation of cancellation |
@@ -2047,7 +2047,7 @@ discard block |
||
| 2047 | 2047 | $morehtmlref = '<div class="refidno">'; |
| 2048 | 2048 | // Ref supplier |
| 2049 | 2049 | $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', 0, 1); |
| 2050 | - $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2050 | + $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2051 | 2051 | // Thirdparty |
| 2052 | 2052 | $morehtmlref .= '<br>'; |
| 2053 | 2053 | if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && !empty($usercancreate) && $action == 'edit_thirdparty') { |
@@ -2329,40 +2329,40 @@ discard block |
||
| 2329 | 2329 | |
| 2330 | 2330 | print '<tr>'; |
| 2331 | 2331 | // Amount HT |
| 2332 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 2333 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2332 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 2333 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2334 | 2334 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2335 | 2335 | // Multicurrency Amount HT |
| 2336 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2336 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2337 | 2337 | } |
| 2338 | 2338 | print '</tr>'; |
| 2339 | 2339 | |
| 2340 | 2340 | print '<tr>'; |
| 2341 | 2341 | // Amount VAT |
| 2342 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 2343 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2342 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 2343 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2344 | 2344 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2345 | 2345 | // Multicurrency Amount VAT |
| 2346 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2346 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2347 | 2347 | } |
| 2348 | 2348 | print '</tr>'; |
| 2349 | 2349 | |
| 2350 | 2350 | // Amount Local Taxes |
| 2351 | 2351 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 2352 | 2352 | print '<tr>'; |
| 2353 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 2354 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2353 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 2354 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2355 | 2355 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2356 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2356 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2357 | 2357 | } |
| 2358 | 2358 | print '</tr>'; |
| 2359 | 2359 | |
| 2360 | 2360 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 2361 | 2361 | print '<tr>'; |
| 2362 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 2363 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2362 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 2363 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2364 | 2364 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2365 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2365 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2366 | 2366 | } |
| 2367 | 2367 | print '</tr>'; |
| 2368 | 2368 | } |
@@ -2370,16 +2370,16 @@ discard block |
||
| 2370 | 2370 | |
| 2371 | 2371 | $alert = ''; |
| 2372 | 2372 | if (!empty($conf->global->ORDER_MANAGE_MIN_AMOUNT) && $object->total_ht < $object->thirdparty->supplier_order_min_amount) { |
| 2373 | - $alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->supplier_order_min_amount)); |
|
| 2373 | + $alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->supplier_order_min_amount)); |
|
| 2374 | 2374 | } |
| 2375 | 2375 | |
| 2376 | 2376 | print '<tr>'; |
| 2377 | 2377 | // Amount TTC |
| 2378 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 2379 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . $alert . '</td>'; |
|
| 2378 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 2379 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).$alert.'</td>'; |
|
| 2380 | 2380 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2381 | 2381 | // Multicurrency Amount TTC |
| 2382 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2382 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2383 | 2383 | } |
| 2384 | 2384 | print '</tr>'; |
| 2385 | 2385 | |
@@ -2705,7 +2705,7 @@ discard block |
||
| 2705 | 2705 | $action = 'presend'; |
| 2706 | 2706 | } |
| 2707 | 2707 | |
| 2708 | - if ($action != 'createorder' && $action != 'presend' ) { |
|
| 2708 | + if ($action != 'createorder' && $action != 'presend') { |
|
| 2709 | 2709 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 2710 | 2710 | |
| 2711 | 2711 | // Generated documents |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $search_date_endday = GETPOST('search_date_endday', 'int'); |
| 75 | 75 | $search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
| 76 | 76 | $search_date_endyear = GETPOST('search_date_endyear', 'int'); |
| 77 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 77 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 78 | 78 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 79 | 79 | $search_date_valid_startday = GETPOST('search_date_valid_startday', 'int'); |
| 80 | 80 | $search_date_valid_startmonth = GETPOST('search_date_valid_startmonth', 'int'); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $search_date_valid_endday = GETPOST('search_date_valid_endday', 'int'); |
| 83 | 83 | $search_date_valid_endmonth = GETPOST('search_date_valid_endmonth', 'int'); |
| 84 | 84 | $search_date_valid_endyear = GETPOST('search_date_valid_endyear', 'int'); |
| 85 | -$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
| 85 | +$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
| 86 | 86 | $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear); |
| 87 | 87 | $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); |
| 88 | 88 | $search_montant_ht = GETPOST('search_montant_ht', 'alpha'); |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | if ($searchCategoryProductOperator == 0) { |
| 443 | 443 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."supplier_proposaldet as sd WHERE sd.fk_supplier_proposal = sp.rowid AND sd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 444 | 444 | } else { |
| 445 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 445 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 446 | 446 | } |
| 447 | 447 | } |
| 448 | 448 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * \brief Main page for ECM section area |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -if (! defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1); |
|
| 26 | +if (!defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1); |
|
| 27 | 27 | |
| 28 | 28 | // Load Dolibarr environment |
| 29 | 29 | require '../main.inc.php'; |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | * \brief Main page for ECM section area |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -if (! defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1); |
|
| 26 | +if (! defined('DISABLE_JS_GRAHP')) { |
|
| 27 | + define('DISABLE_JS_GRAPH', 1); |
|
| 28 | +} |
|
| 27 | 29 | |
| 28 | 30 | // Load Dolibarr environment |
| 29 | 31 | require '../main.inc.php'; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'enabled'=>(isModEnabled('commande') && isModEnabled('facture')), |
| 73 | 73 | 'picto'=>'bill' |
| 74 | 74 | ), |
| 75 | - 'WORKFLOW_TICKET_CREATE_INTERVENTION' => array ( |
|
| 75 | + 'WORKFLOW_TICKET_CREATE_INTERVENTION' => array( |
|
| 76 | 76 | 'family'=>'create', |
| 77 | 77 | 'position'=>25, |
| 78 | 78 | 'enabled'=>(isModEnabled('ticket') && isModEnabled('ficheinter')), |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | // remove not available workflows (based on activated modules and global defined keys) |
| 195 | -$workflowcodes = array_filter($workflowcodes, function ($var) { |
|
| 195 | +$workflowcodes = array_filter($workflowcodes, function($var) { |
|
| 196 | 196 | return $var['enabled']; |
| 197 | 197 | }); |
| 198 | 198 | |