@@ -150,8 +150,8 @@ |
||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | $coldisplay += $colspan; |
| 153 | -print '<td class="bordertop nobottom linecoledit right valignmiddle" colspan="' . $colspan . '">'; |
|
| 154 | -print '<input type="submit" class="button button-add small" name="addline" id="addline" value="' . $langs->trans('Add') . '">'; |
|
| 153 | +print '<td class="bordertop nobottom linecoledit right valignmiddle" colspan="'.$colspan.'">'; |
|
| 154 | +print '<input type="submit" class="button button-add small" name="addline" id="addline" value="'.$langs->trans('Add').'">'; |
|
| 155 | 155 | print '</td>'; |
| 156 | 156 | print '</tr>'; |
| 157 | 157 | |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | $this->mode_reglement_id = 0; |
| 490 | 490 | } |
| 491 | 491 | $this->status = self::STATUS_DRAFT; |
| 492 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 492 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 493 | 493 | |
| 494 | 494 | if (!empty($this->multicurrency_code)) { |
| 495 | 495 | // Multicurrency (test on $this->multicurrency_tx because we should take the default rate of multicurrency_code only if not using original rate) |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | // Define the entity |
| 581 | - $this->entity = $_facrec->entity; // Invoice created in same entity than template |
|
| 581 | + $this->entity = $_facrec->entity; // Invoice created in same entity than template |
|
| 582 | 582 | |
| 583 | 583 | // Fields coming from GUI. |
| 584 | 584 | // @TODO Value of template should be used as default value on the form on the GUI, and we should here always use the value from GUI |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | $this->mode_reglement_id = 0; |
| 618 | 618 | } |
| 619 | 619 | $this->status = self::STATUS_DRAFT; |
| 620 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 620 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 621 | 621 | |
| 622 | 622 | $this->linked_objects = $_facrec->linkedObjectsIds; |
| 623 | 623 | // We do not add link to template invoice or next invoice will be linked to all generated invoices |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | |
| 868 | 868 | // Complete vat rate with code |
| 869 | 869 | $vatrate = $newinvoiceline->tva_tx; |
| 870 | - if ($newinvoiceline->vat_src_code && ! preg_match('/\(.*\)/', (string) $vatrate)) { |
|
| 870 | + if ($newinvoiceline->vat_src_code && !preg_match('/\(.*\)/', (string) $vatrate)) { |
|
| 871 | 871 | $vatrate .= ' ('.$newinvoiceline->vat_src_code.')'; |
| 872 | 872 | } |
| 873 | 873 | |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | ($_facrec->lines[$i]->date_end_fill == 1 && $previousdaynextdatewhen) ? $previousdaynextdatewhen : '', |
| 1081 | 1081 | 0, |
| 1082 | 1082 | $tva_npr, |
| 1083 | - 0, // fk_remise_except |
|
| 1083 | + 0, // fk_remise_except |
|
| 1084 | 1084 | 'HT', |
| 1085 | 1085 | 0, |
| 1086 | 1086 | $_facrec->lines[$i]->product_type, |
@@ -1090,11 +1090,11 @@ discard block |
||
| 1090 | 1090 | 0, |
| 1091 | 1091 | $fk_parent_line, |
| 1092 | 1092 | $fk_product_fournisseur_price, |
| 1093 | - is_null($buyprice) ? '' : $buyprice, // do not use (float) here, it may be '' |
|
| 1093 | + is_null($buyprice) ? '' : $buyprice, // do not use (float) here, it may be '' |
|
| 1094 | 1094 | $_facrec->lines[$i]->label, |
| 1095 | 1095 | empty($_facrec->lines[$i]->array_options) ? null : $_facrec->lines[$i]->array_options, |
| 1096 | - 100, // situation percent is undefined on recurring invoice lines |
|
| 1097 | - 0, // fk_prev_id |
|
| 1096 | + 100, // situation percent is undefined on recurring invoice lines |
|
| 1097 | + 0, // fk_prev_id |
|
| 1098 | 1098 | $_facrec->lines[$i]->fk_unit, |
| 1099 | 1099 | $_facrec->lines[$i]->multicurrency_subprice, |
| 1100 | 1100 | $_facrec->lines[$i]->ref_ext, |
@@ -1189,7 +1189,7 @@ discard block |
||
| 1189 | 1189 | |
| 1190 | 1190 | $facture->fk_facture_source = $this->fk_facture_source; |
| 1191 | 1191 | $facture->type = $this->type; |
| 1192 | - $facture->subtype = $this->subtype; |
|
| 1192 | + $facture->subtype = $this->subtype; |
|
| 1193 | 1193 | $facture->socid = $this->socid; |
| 1194 | 1194 | $facture->date = $this->date; |
| 1195 | 1195 | $facture->date_pointoftax = $this->date_pointoftax; |
@@ -1206,7 +1206,7 @@ discard block |
||
| 1206 | 1206 | |
| 1207 | 1207 | $facture->origin = $this->origin; |
| 1208 | 1208 | $facture->origin_id = $this->origin_id; |
| 1209 | - $facture->fk_account = $this->fk_account; |
|
| 1209 | + $facture->fk_account = $this->fk_account; |
|
| 1210 | 1210 | |
| 1211 | 1211 | $facture->lines = $this->lines; // Array of lines of invoice |
| 1212 | 1212 | $facture->situation_counter = $this->situation_counter; |
@@ -1311,7 +1311,7 @@ discard block |
||
| 1311 | 1311 | $object->date_modification = ''; |
| 1312 | 1312 | $object->date_validation = ''; |
| 1313 | 1313 | $object->ref_client = ''; |
| 1314 | - $object->ref_customer = ''; |
|
| 1314 | + $object->ref_customer = ''; |
|
| 1315 | 1315 | $object->close_code = ''; |
| 1316 | 1316 | $object->close_note = ''; |
| 1317 | 1317 | if (getDolGlobalInt('MAIN_DONT_KEEP_NOTE_ON_CLONING') == 1) { |
@@ -1473,8 +1473,8 @@ discard block |
||
| 1473 | 1473 | $this->fk_account = $object->fk_account; |
| 1474 | 1474 | $this->cond_reglement_id = $object->cond_reglement_id; |
| 1475 | 1475 | $this->mode_reglement_id = $object->mode_reglement_id; |
| 1476 | - $this->fk_incoterms = $object->fk_incoterms; |
|
| 1477 | - $this->location_incoterms = $object->location_incoterms; |
|
| 1476 | + $this->fk_incoterms = $object->fk_incoterms; |
|
| 1477 | + $this->location_incoterms = $object->location_incoterms; |
|
| 1478 | 1478 | $this->availability_id = $object->availability_id; |
| 1479 | 1479 | $this->demand_reason_id = $object->demand_reason_id; |
| 1480 | 1480 | $this->delivery_date = $object->delivery_date; |
@@ -1686,7 +1686,7 @@ discard block |
||
| 1686 | 1686 | { |
| 1687 | 1687 | global $conf, $langs, $hookmanager, $action; |
| 1688 | 1688 | |
| 1689 | - if (! in_array($origin->element, array('propal', 'commande'))) { |
|
| 1689 | + if (!in_array($origin->element, array('propal', 'commande'))) { |
|
| 1690 | 1690 | $origin->error = 'ErrorCanOnlyAutomaticallyGenerateADepositFromProposalOrOrder'; |
| 1691 | 1691 | return null; |
| 1692 | 1692 | } |
@@ -1696,7 +1696,7 @@ discard block |
||
| 1696 | 1696 | return null; |
| 1697 | 1697 | } |
| 1698 | 1698 | |
| 1699 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 1699 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 1700 | 1700 | |
| 1701 | 1701 | if ($date > (dol_get_last_hour(dol_now('tzuserrel')) + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) { |
| 1702 | 1702 | $origin->error = 'ErrorDateIsInFuture'; |
@@ -1741,7 +1741,7 @@ discard block |
||
| 1741 | 1741 | $deposit->pos_source = $origin->pos_source; |
| 1742 | 1742 | $deposit->model_pdf = 'crabe'; |
| 1743 | 1743 | |
| 1744 | - $modelByTypeConfName = 'FACTURE_ADDON_PDF_' . $deposit->type; |
|
| 1744 | + $modelByTypeConfName = 'FACTURE_ADDON_PDF_'.$deposit->type; |
|
| 1745 | 1745 | |
| 1746 | 1746 | if (getDolGlobalString($modelByTypeConfName)) { |
| 1747 | 1747 | $deposit->model_pdf = getDolGlobalString($modelByTypeConfName); |
@@ -1801,10 +1801,10 @@ discard block |
||
| 1801 | 1801 | $descriptions[$key] = ''; |
| 1802 | 1802 | } |
| 1803 | 1803 | $TTotalByTva[$key] += $line->total_ttc; |
| 1804 | - $descriptions[$key] .= '<li>' . (!empty($line->product_ref) ? $line->product_ref . ' - ' : ''); |
|
| 1805 | - $descriptions[$key] .= (!empty($line->product_label) ? $line->product_label . ' - ' : ''); |
|
| 1806 | - $descriptions[$key] .= $langs->trans('Qty') . ' : ' . $line->qty; |
|
| 1807 | - $descriptions[$key] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($line->total_ht) . '</li>'; |
|
| 1804 | + $descriptions[$key] .= '<li>'.(!empty($line->product_ref) ? $line->product_ref.' - ' : ''); |
|
| 1805 | + $descriptions[$key] .= (!empty($line->product_label) ? $line->product_label.' - ' : ''); |
|
| 1806 | + $descriptions[$key] .= $langs->trans('Qty').' : '.$line->qty; |
|
| 1807 | + $descriptions[$key] .= ' - '.$langs->trans('TotalHT').' : '.price($line->total_ht).'</li>'; |
|
| 1808 | 1808 | } |
| 1809 | 1809 | |
| 1810 | 1810 | foreach ($TTotalByTva as $tva => &$total) { |
@@ -1828,10 +1828,10 @@ discard block |
||
| 1828 | 1828 | $totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ? |
| 1829 | 1829 | $tva_tx = $lines[$i]->tva_tx; |
| 1830 | 1830 | $amountdeposit[$tva_tx] += ((float) $lines[$i]->total_ht * (float) $origin->deposit_percent) / 100; |
| 1831 | - $descriptions[$tva_tx] .= '<li>' . (!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref . ' - ' : ''); |
|
| 1832 | - $descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label . ' - ' : ''); |
|
| 1833 | - $descriptions[$tva_tx] .= $langs->trans('Qty') . ' : ' . $lines[$i]->qty; |
|
| 1834 | - $descriptions[$tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($lines[$i]->total_ht) . '</li>'; |
|
| 1831 | + $descriptions[$tva_tx] .= '<li>'.(!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref.' - ' : ''); |
|
| 1832 | + $descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label.' - ' : ''); |
|
| 1833 | + $descriptions[$tva_tx] .= $langs->trans('Qty').' : '.$lines[$i]->qty; |
|
| 1834 | + $descriptions[$tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($lines[$i]->total_ht).'</li>'; |
|
| 1835 | 1835 | } |
| 1836 | 1836 | |
| 1837 | 1837 | if ($totalamount == 0) { |
@@ -1846,11 +1846,11 @@ discard block |
||
| 1846 | 1846 | continue; |
| 1847 | 1847 | } |
| 1848 | 1848 | |
| 1849 | - $descline = '(DEPOSIT) ('. $origin->deposit_percent .'%) - '.$origin->ref; |
|
| 1849 | + $descline = '(DEPOSIT) ('.$origin->deposit_percent.'%) - '.$origin->ref; |
|
| 1850 | 1850 | |
| 1851 | 1851 | // Hidden conf |
| 1852 | 1852 | if (getDolGlobalString('INVOICE_DEPOSIT_VARIABLE_MODE_DETAIL_LINES_IN_DESCRIPTION') && !empty($descriptions[$tva])) { |
| 1853 | - $descline .= '<ul>' . $descriptions[$tva] . '</ul>'; |
|
| 1853 | + $descline .= '<ul>'.$descriptions[$tva].'</ul>'; |
|
| 1854 | 1854 | } |
| 1855 | 1855 | |
| 1856 | 1856 | $addlineResult = $deposit->addline( |
@@ -2237,7 +2237,7 @@ discard block |
||
| 2237 | 2237 | : ''; |
| 2238 | 2238 | |
| 2239 | 2239 | if ($type !== 'separate') { |
| 2240 | - if (in_array($type, array('point','multipts','linestrg','polygon'))) { |
|
| 2240 | + if (in_array($type, array('point', 'multipts', 'linestrg', 'polygon'))) { |
|
| 2241 | 2241 | $sql .= ", ST_AsWKT(ef.".$key.") as ".$key; |
| 2242 | 2242 | } else { |
| 2243 | 2243 | $sql .= ", ef.".$key; |
@@ -2280,9 +2280,9 @@ discard block |
||
| 2280 | 2280 | $this->id = $obj->rowid; |
| 2281 | 2281 | $this->entity = $obj->entity; |
| 2282 | 2282 | |
| 2283 | - $this->ref = $obj->ref; |
|
| 2284 | - $this->ref_client = $obj->ref_client; |
|
| 2285 | - $this->ref_customer = $obj->ref_client; |
|
| 2283 | + $this->ref = $obj->ref; |
|
| 2284 | + $this->ref_client = $obj->ref_client; |
|
| 2285 | + $this->ref_customer = $obj->ref_client; |
|
| 2286 | 2286 | $this->ref_ext = $obj->ref_ext; |
| 2287 | 2287 | $this->type = $obj->type; |
| 2288 | 2288 | $this->subtype = $obj->subtype; |
@@ -2308,7 +2308,7 @@ discard block |
||
| 2308 | 2308 | $this->fk_project = $obj->fk_project; |
| 2309 | 2309 | $this->project = null; // Clear if another value was already set by fetch_projet |
| 2310 | 2310 | |
| 2311 | - $this->statut = $obj->status; // deprecated |
|
| 2311 | + $this->statut = $obj->status; // deprecated |
|
| 2312 | 2312 | $this->status = $obj->status; |
| 2313 | 2313 | |
| 2314 | 2314 | $this->date_lim_reglement = $this->db->jdate($obj->dlr); |
@@ -2324,7 +2324,7 @@ discard block |
||
| 2324 | 2324 | $this->fk_fac_rec_source = $obj->fk_fac_rec_source; |
| 2325 | 2325 | $this->note = $obj->note_private; // deprecated |
| 2326 | 2326 | $this->note_private = $obj->note_private; |
| 2327 | - $this->note_public = $obj->note_public; |
|
| 2327 | + $this->note_public = $obj->note_public; |
|
| 2328 | 2328 | $this->user_creation_id = $obj->fk_user_author; |
| 2329 | 2329 | $this->user_validation_id = $obj->fk_user_valid; |
| 2330 | 2330 | $this->user_modification_id = $obj->fk_user_modif; |
@@ -2377,15 +2377,15 @@ discard block |
||
| 2377 | 2377 | |
| 2378 | 2378 | // date/datetime |
| 2379 | 2379 | if (in_array($type, array('date', 'datetime'))) { |
| 2380 | - $this->array_options['options_' . $key] = $this->db->jdate($rawval); |
|
| 2380 | + $this->array_options['options_'.$key] = $this->db->jdate($rawval); |
|
| 2381 | 2381 | } elseif ($type == 'password') { |
| 2382 | 2382 | if (!empty($rawval) && preg_match('/^dolcrypt:/', $rawval)) { |
| 2383 | - $this->array_options['options_' . $key] = dolDecrypt($rawval); |
|
| 2383 | + $this->array_options['options_'.$key] = dolDecrypt($rawval); |
|
| 2384 | 2384 | } else { |
| 2385 | - $this->array_options['options_' . $key] = $rawval; |
|
| 2385 | + $this->array_options['options_'.$key] = $rawval; |
|
| 2386 | 2386 | } |
| 2387 | 2387 | } else { |
| 2388 | - $this->array_options['options_' . $key] = $rawval; |
|
| 2388 | + $this->array_options['options_'.$key] = $rawval; |
|
| 2389 | 2389 | } |
| 2390 | 2390 | } |
| 2391 | 2391 | } |
@@ -2396,7 +2396,7 @@ discard block |
||
| 2396 | 2396 | if (empty($conf->disable_compute)) { |
| 2397 | 2397 | global $objectoffield; |
| 2398 | 2398 | $objectoffield = $this; |
| 2399 | - $this->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '2'); |
|
| 2399 | + $this->array_options['options_'.$key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '2'); |
|
| 2400 | 2400 | } |
| 2401 | 2401 | } |
| 2402 | 2402 | } |
@@ -2492,7 +2492,7 @@ discard block |
||
| 2492 | 2492 | : ''; |
| 2493 | 2493 | |
| 2494 | 2494 | if ($type !== 'separate') { |
| 2495 | - if (in_array($type, array('point','multipts','linestrg','polygon'))) { |
|
| 2495 | + if (in_array($type, array('point', 'multipts', 'linestrg', 'polygon'))) { |
|
| 2496 | 2496 | $sql .= ", ST_AsWKT(ef.".$key.") as ".$key; |
| 2497 | 2497 | } else { |
| 2498 | 2498 | $sql .= ", ef.".$key; |
@@ -2532,7 +2532,7 @@ discard block |
||
| 2532 | 2532 | $line->ref = $objp->product_ref; // Ref product |
| 2533 | 2533 | $line->product_ref = $objp->product_ref; // Ref product |
| 2534 | 2534 | $line->libelle = $objp->product_label; // deprecated |
| 2535 | - $line->product_label = $objp->product_label; // Label product |
|
| 2535 | + $line->product_label = $objp->product_label; // Label product |
|
| 2536 | 2536 | $line->product_barcode = $objp->product_barcode; // Barcode number product |
| 2537 | 2537 | $line->product_desc = $objp->product_desc; // Description product |
| 2538 | 2538 | $line->fk_product_type = $objp->fk_product_type; // Type of product |
@@ -2598,15 +2598,15 @@ discard block |
||
| 2598 | 2598 | |
| 2599 | 2599 | // date/datetime |
| 2600 | 2600 | if (in_array($type, array('date', 'datetime'))) { |
| 2601 | - $line->array_options['options_' . $key] = $this->db->jdate($rawval); |
|
| 2601 | + $line->array_options['options_'.$key] = $this->db->jdate($rawval); |
|
| 2602 | 2602 | } elseif ($type == 'password') { |
| 2603 | 2603 | if (!empty($rawval) && preg_match('/^dolcrypt:/', $rawval)) { |
| 2604 | - $line->array_options['options_' . $key] = dolDecrypt($rawval); |
|
| 2604 | + $line->array_options['options_'.$key] = dolDecrypt($rawval); |
|
| 2605 | 2605 | } else { |
| 2606 | - $line->array_options['options_' . $key] = $rawval; |
|
| 2606 | + $line->array_options['options_'.$key] = $rawval; |
|
| 2607 | 2607 | } |
| 2608 | 2608 | } else { |
| 2609 | - $line->array_options['options_' . $key] = $rawval; |
|
| 2609 | + $line->array_options['options_'.$key] = $rawval; |
|
| 2610 | 2610 | } |
| 2611 | 2611 | } |
| 2612 | 2612 | } |
@@ -2617,7 +2617,7 @@ discard block |
||
| 2617 | 2617 | if (empty($conf->disable_compute)) { |
| 2618 | 2618 | global $objectoffield; |
| 2619 | 2619 | $objectoffield = $line; |
| 2620 | - $line->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element_line]['computed'][$key], 1, 0, '2'); |
|
| 2620 | + $line->array_options['options_'.$key] = dol_eval($extrafields->attributes[$this->table_element_line]['computed'][$key], 1, 0, '2'); |
|
| 2621 | 2621 | } |
| 2622 | 2622 | } |
| 2623 | 2623 | } |
@@ -3538,10 +3538,10 @@ discard block |
||
| 3538 | 3538 | if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('facture', 'creer')) |
| 3539 | 3539 | || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('facture', 'invoice_advance', 'validate'))) { |
| 3540 | 3540 | $this->error = 'Permission denied'; |
| 3541 | - dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS=' . getDolGlobalString('MAIN_USE_ADVANCED_PERMS'), LOG_ERR); |
|
| 3541 | + dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS='.getDolGlobalString('MAIN_USE_ADVANCED_PERMS'), LOG_ERR); |
|
| 3542 | 3542 | return -1; |
| 3543 | 3543 | } |
| 3544 | - if ((preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) && // empty should not happened, but when it occurs, the test save life |
|
| 3544 | + if ((preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) && // empty should not happened, but when it occurs, the test save life |
|
| 3545 | 3545 | getDolGlobalString('FAC_FORCE_DATE_VALIDATION') // If option enabled, we force invoice date |
| 3546 | 3546 | ) { |
| 3547 | 3547 | $this->date = dol_now(); |
@@ -3725,7 +3725,7 @@ discard block |
||
| 3725 | 3725 | for ($i = 0; $i < $cpt; $i++) { |
| 3726 | 3726 | if ($this->lines[$i]->fk_product > 0) { |
| 3727 | 3727 | $mouvP = new MouvementStock($this->db); |
| 3728 | - $mouvP->origin = &$this; // deprecated |
|
| 3728 | + $mouvP->origin = &$this; // deprecated |
|
| 3729 | 3729 | $mouvP->setOrigin($this->element, $this->id); |
| 3730 | 3730 | |
| 3731 | 3731 | // We decrease stock for product |
@@ -3895,7 +3895,7 @@ discard block |
||
| 3895 | 3895 | // Set new ref and define current status |
| 3896 | 3896 | if (!$error) { |
| 3897 | 3897 | $this->ref = $num; |
| 3898 | - $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 3898 | + $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 3899 | 3899 | $this->status = self::STATUS_VALIDATED; |
| 3900 | 3900 | $this->date_validation = $now; |
| 3901 | 3901 | $i = 0; |
@@ -3921,13 +3921,13 @@ discard block |
||
| 3921 | 3921 | if ($this->situation_final) { |
| 3922 | 3922 | // If we must change situation_final |
| 3923 | 3923 | $this->situation_final = 0; |
| 3924 | - $this->setFinal($user, 1); // Trigger is disabled, already run by the validate |
|
| 3924 | + $this->setFinal($user, 1); // Trigger is disabled, already run by the validate |
|
| 3925 | 3925 | } |
| 3926 | 3926 | } else { |
| 3927 | 3927 | if (!$this->situation_final) { |
| 3928 | 3928 | // If we must change situation_final |
| 3929 | 3929 | $this->situation_final = 1; |
| 3930 | - $this->setFinal($user, 1); // Trigger is disabled, already run by the validate |
|
| 3930 | + $this->setFinal($user, 1); // Trigger is disabled, already run by the validate |
|
| 3931 | 3931 | } |
| 3932 | 3932 | } |
| 3933 | 3933 | } |
@@ -4080,7 +4080,7 @@ discard block |
||
| 4080 | 4080 | |
| 4081 | 4081 | if ($error == 0) { |
| 4082 | 4082 | $old_statut = $this->status; |
| 4083 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 4083 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 4084 | 4084 | $this->status = self::STATUS_DRAFT; |
| 4085 | 4085 | |
| 4086 | 4086 | // Call trigger |
@@ -4676,7 +4676,7 @@ discard block |
||
| 4676 | 4676 | $this->line->rang = $rangmax + 1; |
| 4677 | 4677 | } |
| 4678 | 4678 | $apply_abs_price_on_credit_note = false; |
| 4679 | - if ($this->type == self::TYPE_CREDIT_NOTE && !getDolGlobalInt('FACTURE_ENABLE_NEGATIVE_LINES') && !getDolGlobalInt('INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN')) { |
|
| 4679 | + if ($this->type == self::TYPE_CREDIT_NOTE && !getDolGlobalInt('FACTURE_ENABLE_NEGATIVE_LINES') && !getDolGlobalInt('INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN')) { |
|
| 4680 | 4680 | $apply_abs_price_on_credit_note = true; |
| 4681 | 4681 | } |
| 4682 | 4682 | |
@@ -5112,7 +5112,7 @@ discard block |
||
| 5112 | 5112 | } |
| 5113 | 5113 | |
| 5114 | 5114 | if (!empty($addon)) { |
| 5115 | - dol_syslog("Call getNextNumRef with ".$addonConstName." = " . getDolGlobalString('FACTURE_ADDON').", thirdparty=".$soc->name.", type=".$soc->typent_code.", mode=".$mode, LOG_DEBUG); |
|
| 5115 | + dol_syslog("Call getNextNumRef with ".$addonConstName." = ".getDolGlobalString('FACTURE_ADDON').", thirdparty=".$soc->name.", type=".$soc->typent_code.", mode=".$mode, LOG_DEBUG); |
|
| 5116 | 5116 | |
| 5117 | 5117 | $mybool = false; |
| 5118 | 5118 | |
@@ -5400,7 +5400,7 @@ discard block |
||
| 5400 | 5400 | if (getDolGlobalInt('LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED') > 0) { |
| 5401 | 5401 | $sql .= " ORDER BY CASE WHEN f.rowid = ".((int) GETPOST('fac_avoir'))."' THEN 0 ELSE 1 END, f.ref"; |
| 5402 | 5402 | $sql .= " DESC"; |
| 5403 | - $sql .= " LIMIT " . getDolGlobalInt('LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED'); |
|
| 5403 | + $sql .= " LIMIT ".getDolGlobalInt('LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED'); |
|
| 5404 | 5404 | } else { |
| 5405 | 5405 | $sql .= " ORDER BY f.ref"; |
| 5406 | 5406 | } |
@@ -5584,13 +5584,13 @@ discard block |
||
| 5584 | 5584 | $this->fk_incoterms = 0; |
| 5585 | 5585 | $this->location_incoterms = ''; |
| 5586 | 5586 | |
| 5587 | - $this->pos_print_counter = 3; // Already printed 3 times |
|
| 5587 | + $this->pos_print_counter = 3; // Already printed 3 times |
|
| 5588 | 5588 | |
| 5589 | 5589 | $this->status = 0; |
| 5590 | 5590 | |
| 5591 | 5591 | if (empty($option) || $option != 'nolines') { |
| 5592 | 5592 | // Lines |
| 5593 | - $nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000) |
|
| 5593 | + $nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000) |
|
| 5594 | 5594 | $xnbp = 0; |
| 5595 | 5595 | while ($xnbp < $nbp) { |
| 5596 | 5596 | $line = new FactureLigne($this->db); |
@@ -6218,14 +6218,14 @@ discard block |
||
| 6218 | 6218 | if (!empty($paymentmode) && $paymentmode != 'all') { |
| 6219 | 6219 | $sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp"; |
| 6220 | 6220 | } |
| 6221 | - $sql .= " WHERE f.paye = 0"; // Only unpaid |
|
| 6222 | - $sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status |
|
| 6221 | + $sql .= " WHERE f.paye = 0"; // Only unpaid |
|
| 6222 | + $sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status |
|
| 6223 | 6223 | if ($datetouse == 'invoicedate') { |
| 6224 | 6224 | $sql .= " AND f.datef = '".$this->db->idate($tmpidate, 'gmt')."'"; |
| 6225 | 6225 | } else { |
| 6226 | 6226 | $sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'"; |
| 6227 | 6227 | } |
| 6228 | - $sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch processes only one company (no sharing) |
|
| 6228 | + $sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch processes only one company (no sharing) |
|
| 6229 | 6229 | if (!empty($paymentmode) && $paymentmode != 'all') { |
| 6230 | 6230 | $sql .= " AND f.fk_mode_reglement = cp.id AND cp.code = '".$this->db->escape($paymentmode)."'"; |
| 6231 | 6231 | } |
@@ -6451,7 +6451,7 @@ discard block |
||
| 6451 | 6451 | $actioncomm->create($user); |
| 6452 | 6452 | } |
| 6453 | 6453 | |
| 6454 | - $this->db->commit(); // We always commit |
|
| 6454 | + $this->db->commit(); // We always commit |
|
| 6455 | 6455 | } |
| 6456 | 6456 | |
| 6457 | 6457 | if ($errormesg) { |
@@ -6494,7 +6494,7 @@ discard block |
||
| 6494 | 6494 | // get date of last validated invoices of same type |
| 6495 | 6495 | $sql = "SELECT datef"; |
| 6496 | 6496 | $sql .= " FROM ".MAIN_DB_PREFIX."facture"; |
| 6497 | - $sql .= " WHERE type = " . (int) $this->type ; |
|
| 6497 | + $sql .= " WHERE type = ".(int) $this->type; |
|
| 6498 | 6498 | $sql .= " AND date_valid IS NOT NULL"; |
| 6499 | 6499 | $sql .= " AND entity IN (".getEntity('invoice').")"; |
| 6500 | 6500 | $sql .= " ORDER BY datef DESC LIMIT 1"; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $formbarcode = null; |
| 109 | 109 | |
| 110 | 110 | // Get parameters |
| 111 | -$id = GETPOSTINT('id'); |
|
| 111 | +$id = GETPOSTINT('id'); |
|
| 112 | 112 | if (getDolGlobalString('MAIN_SECURITY_ALLOW_UNSECURED_REF_LABELS')) { |
| 113 | 113 | $ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'nohtml') : null); |
| 114 | 114 | } else { |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 121 | 121 | $confirm = GETPOST('confirm', 'alpha'); |
| 122 | 122 | $socid = GETPOSTINT('socid'); |
| 123 | -$duration_value = GETPOST('duration_value') === '' ? null : GETPOSTINT('duration_value'); // duration value can be an empty string |
|
| 123 | +$duration_value = GETPOST('duration_value') === '' ? null : GETPOSTINT('duration_value'); // duration value can be an empty string |
|
| 124 | 124 | $duration_unit = GETPOST('duration_unit', 'alpha'); |
| 125 | 125 | |
| 126 | 126 | $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | // Quick edit for extrafields |
| 498 | 498 | if ($action == 'update_extras' && $permissiontoeditextra) { |
| 499 | 499 | // we may use oldcopy->hasBatch( in triggers so keep 1 |
| 500 | - $object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 500 | + $object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 501 | 501 | |
| 502 | 502 | $attribute_name = GETPOST('attribute', 'aZ09'); |
| 503 | 503 | |
@@ -656,7 +656,7 @@ discard block |
||
| 656 | 656 | $object->width = GETPOST('sizewidth'); |
| 657 | 657 | $object->height = GETPOST('sizeheight'); |
| 658 | 658 | $object->surface = GETPOST('surface'); |
| 659 | - $object->surface_units = GETPOST('surface_units') === '' ? null : GETPOSTINT('surface_units'); // This is not the fk_unit but the power of unit |
|
| 659 | + $object->surface_units = GETPOST('surface_units') === '' ? null : GETPOSTINT('surface_units'); // This is not the fk_unit but the power of unit |
|
| 660 | 660 | $object->volume = GETPOST('volume'); |
| 661 | 661 | $object->volume_units = GETPOST('volume_units') === '' ? null : GETPOSTINT('volume_units'); // This is not the fk_unit but the power of unit |
| 662 | 662 | $finished = GETPOSTINT('finished'); |
@@ -792,7 +792,7 @@ discard block |
||
| 792 | 792 | } else { |
| 793 | 793 | if ($object->id > 0) { |
| 794 | 794 | // Need dol_clone methode 1 (same object class) because update product use hasbatch() method on oldcopy |
| 795 | - $object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 795 | + $object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 796 | 796 | |
| 797 | 797 | if (!getDolGlobalString('PRODUCT_GENERATE_REF_AFTER_FORM')) { |
| 798 | 798 | $object->ref = (string) $ref; |
@@ -924,7 +924,7 @@ discard block |
||
| 924 | 924 | $object->accountancy_code_buy_export = $accountancy_code_buy_export; |
| 925 | 925 | } |
| 926 | 926 | if ($object->isService()) { |
| 927 | - $object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0 ; |
|
| 927 | + $object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0; |
|
| 928 | 928 | } |
| 929 | 929 | |
| 930 | 930 | |
@@ -1058,7 +1058,7 @@ discard block |
||
| 1058 | 1058 | $action = ""; |
| 1059 | 1059 | |
| 1060 | 1060 | $mesg = $langs->trans("ErrorProductAlreadyExists", $clone->ref); |
| 1061 | - $mesg .= ' <a href="' . $_SERVER["PHP_SELF"] . '?ref=' . $clone->ref . '">' . $langs->trans("ShowCardHere") . '</a>.'; |
|
| 1061 | + $mesg .= ' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$clone->ref.'">'.$langs->trans("ShowCardHere").'</a>.'; |
|
| 1062 | 1062 | setEventMessages($mesg, null, 'errors'); |
| 1063 | 1063 | } else { |
| 1064 | 1064 | setEventMessages(empty($clone->error) ? '' : $langs->trans($clone->error), $clone->errors, 'errors'); |
@@ -1073,7 +1073,7 @@ discard block |
||
| 1073 | 1073 | } else { |
| 1074 | 1074 | $db->commit(); |
| 1075 | 1075 | $db->close(); |
| 1076 | - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); |
|
| 1076 | + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); |
|
| 1077 | 1077 | exit; |
| 1078 | 1078 | } |
| 1079 | 1079 | } else { |
@@ -2284,9 +2284,9 @@ discard block |
||
| 2284 | 2284 | if (isModEnabled('productbatch') && $object->hasbatch()) { |
| 2285 | 2285 | print '<tr><td><input type="hidden" id="stockable_product" name="stockable_product" value="on" /></td><td></td></tr>'; |
| 2286 | 2286 | } else { |
| 2287 | - print '<tr><td><label for="stockable_product">' . $langs->trans("StockableProduct") . '</label></td>'; |
|
| 2287 | + print '<tr><td><label for="stockable_product">'.$langs->trans("StockableProduct").'</label></td>'; |
|
| 2288 | 2288 | $checked = empty($object->stockable_product) ? "" : "checked"; |
| 2289 | - print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '. $checked . ' /></td></tr>'; |
|
| 2289 | + print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '.$checked.' /></td></tr>'; |
|
| 2290 | 2290 | } |
| 2291 | 2291 | |
| 2292 | 2292 | // Default warehouse |
@@ -2346,9 +2346,9 @@ discard block |
||
| 2346 | 2346 | print '</td></tr>'; |
| 2347 | 2347 | |
| 2348 | 2348 | if (isModEnabled('stock') && getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
| 2349 | - print '<tr><td>' . $langs->trans("StockableProduct") . '</td>'; |
|
| 2349 | + print '<tr><td>'.$langs->trans("StockableProduct").'</td>'; |
|
| 2350 | 2350 | $checked = $object->stockable_product == 1 ? "checked" : ""; |
| 2351 | - print '<td><input type="checkbox" id="stockable_product" name="stockable_product" ' . $checked . ' /></td></tr>'; |
|
| 2351 | + print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '.$checked.' /></td></tr>'; |
|
| 2352 | 2352 | } |
| 2353 | 2353 | } else { |
| 2354 | 2354 | if (!getDolGlobalString('PRODUCT_DISABLE_NATURE')) { |
@@ -2419,7 +2419,7 @@ discard block |
||
| 2419 | 2419 | // Customs code |
| 2420 | 2420 | if (!$object->isService() && !getDolGlobalString('PRODUCT_DISABLE_CUSTOMS_INFO')) { |
| 2421 | 2421 | print '<tr><td class="wordbreak">'.$form->textwithpicto($langs->trans("CustomsCode"), $langs->trans("CustomsCodeHelp")).'</td>'; |
| 2422 | - print '<td>' . img_picto('', 'fa-clipboard-check', 'class="pictofixedwidth"') . '<input name="customcode" class="maxwidth100onsmartphone" value="'.(GETPOSTISSET('customcode') ? GETPOST('customcode') : $object->customcode).'"></td></tr>'; |
|
| 2422 | + print '<td>'.img_picto('', 'fa-clipboard-check', 'class="pictofixedwidth"').'<input name="customcode" class="maxwidth100onsmartphone" value="'.(GETPOSTISSET('customcode') ? GETPOST('customcode') : $object->customcode).'"></td></tr>'; |
|
| 2423 | 2423 | // Origin country |
| 2424 | 2424 | print '<tr><td>'.$langs->trans("CountryOrigin").'</td>'; |
| 2425 | 2425 | print '<td>'; |
@@ -2816,7 +2816,7 @@ discard block |
||
| 2816 | 2816 | |
| 2817 | 2817 | // Stockable product / default warehouse |
| 2818 | 2818 | if (($object->isProduct() || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) { |
| 2819 | - print '<tr><td>' . $form->textwithpicto($langs->trans("StockableProduct"), $langs->trans('StockableProductDescription')) . '</td>'; |
|
| 2819 | + print '<tr><td>'.$form->textwithpicto($langs->trans("StockableProduct"), $langs->trans('StockableProductDescription')).'</td>'; |
|
| 2820 | 2820 | print '<td><input type="checkbox" readonly disabled '.($object->stockable_product == 1 ? 'checked' : '').'></td></tr>'; |
| 2821 | 2821 | |
| 2822 | 2822 | if ($object->isStockManaged()) { |
@@ -2873,7 +2873,7 @@ discard block |
||
| 2873 | 2873 | $result = $measuringUnits->fetchAll('', 'scale', 0, 0, ['t.active' => 1, 't.unit_type' => 'time']); |
| 2874 | 2874 | if ($result !== -1) { |
| 2875 | 2875 | foreach ($measuringUnits->records as $record) { |
| 2876 | - $durations[$record->short_label] = dol_ucfirst((string) $record->label) . $plural; |
|
| 2876 | + $durations[$record->short_label] = dol_ucfirst((string) $record->label).$plural; |
|
| 2877 | 2877 | } |
| 2878 | 2878 | } |
| 2879 | 2879 | print '<tr><td class="titlefieldmiddle">'.$langs->trans("Duration").'</td><td>'; |
@@ -3113,7 +3113,7 @@ discard block |
||
| 3113 | 3113 | } |
| 3114 | 3114 | |
| 3115 | 3115 | //Send |
| 3116 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init&token=' . newToken() . '#formmailbeforetitle'); |
|
| 3116 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); |
|
| 3117 | 3117 | |
| 3118 | 3118 | if (!isset($hookmanager->resArray['no_button_copy']) || $hookmanager->resArray['no_button_copy'] != 1) { |
| 3119 | 3119 | if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) { |
@@ -3295,7 +3295,7 @@ discard block |
||
| 3295 | 3295 | $modelmail = 'product_send'; |
| 3296 | 3296 | $defaulttopic = $object->label; |
| 3297 | 3297 | $diroutput = $conf->product->multidir_output[$object->entity ?? $conf->entity]; |
| 3298 | - $trackid = 'prod' . $object->id; |
|
| 3298 | + $trackid = 'prod'.$object->id; |
|
| 3299 | 3299 | |
| 3300 | 3300 | include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
| 3301 | 3301 | } |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | $confirm = GETPOST('confirm', 'alpha'); |
| 61 | 61 | $cancel = GETPOST('cancel', 'aZ09'); |
| 62 | 62 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
| 63 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 64 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
| 63 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 64 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
| 65 | 65 | $qty = GETPOSTINT('qty'); |
| 66 | 66 | $fk_product = GETPOSTINT('fk_product'); |
| 67 | 67 | $fk_warehouse_source = GETPOSTINT('fk_warehouse_source'); |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | $date_prevue_depart = $object->date_prevue_depart; |
| 433 | 433 | $date_prevue_depart_plus_delai = $date_prevue_depart; |
| 434 | 434 | if ($object->lead_time_for_warning > 0) { |
| 435 | - $date_prevue_depart_plus_delai = strtotime(date('Y-m-d', $date_prevue_depart) . ' + '.$object->lead_time_for_warning.' day'); |
|
| 435 | + $date_prevue_depart_plus_delai = strtotime(date('Y-m-d', $date_prevue_depart).' + '.$object->lead_time_for_warning.' day'); |
|
| 436 | 436 | } |
| 437 | 437 | if (!empty($date_prevue_depart) && $date_prevue_depart_plus_delai < strtotime(date('Y-m-d'))) { |
| 438 | 438 | print "$('.valuefield.fieldname_date_prevue_depart').append('"; |
@@ -507,28 +507,28 @@ discard block |
||
| 507 | 507 | |
| 508 | 508 | // Part to edit record |
| 509 | 509 | if (($id || $ref) && $action == 'edit') { |
| 510 | - print load_fiche_titre($langs->trans("StockTransfer"), '', 'object_' . $object->picto); |
|
| 510 | + print load_fiche_titre($langs->trans("StockTransfer"), '', 'object_'.$object->picto); |
|
| 511 | 511 | |
| 512 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 513 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 512 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 513 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 514 | 514 | print '<input type="hidden" name="action" value="update">'; |
| 515 | - print '<input type="hidden" name="id" value="' . $object->id . '">'; |
|
| 515 | + print '<input type="hidden" name="id" value="'.$object->id.'">'; |
|
| 516 | 516 | if ($backtopage) { |
| 517 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 517 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 518 | 518 | } |
| 519 | 519 | if ($backtopageforcancel) { |
| 520 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
| 520 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | print dol_get_fiche_head(); |
| 524 | 524 | |
| 525 | - print '<table class="border centpercent tableforfieldedit">' . "\n"; |
|
| 525 | + print '<table class="border centpercent tableforfieldedit">'."\n"; |
|
| 526 | 526 | |
| 527 | 527 | // Common attributes |
| 528 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; |
|
| 528 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; |
|
| 529 | 529 | |
| 530 | 530 | // Other attributes |
| 531 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php'; |
|
| 531 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; |
|
| 532 | 532 | |
| 533 | 533 | print '</table>'; |
| 534 | 534 | |
@@ -564,28 +564,28 @@ discard block |
||
| 564 | 564 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); |
| 565 | 565 | } elseif ($action == 'destock') { // Destock confirmation |
| 566 | 566 | // Create an array for form |
| 567 | - $formquestion = array( 'text' => '', |
|
| 567 | + $formquestion = array('text' => '', |
|
| 568 | 568 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40), |
| 569 | 569 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 570 | 570 | ); |
| 571 | 571 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1); |
| 572 | 572 | } elseif ($action == 'destockcancel') { // Destock confirmation cancel |
| 573 | 573 | // Create an array for form |
| 574 | - $formquestion = array( 'text' => '', |
|
| 574 | + $formquestion = array('text' => '', |
|
| 575 | 575 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40), |
| 576 | 576 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 577 | 577 | ); |
| 578 | 578 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1); |
| 579 | 579 | } elseif ($action == 'addstock') { // Addstock confirmation |
| 580 | 580 | // Create an array for form |
| 581 | - $formquestion = array( 'text' => '', |
|
| 581 | + $formquestion = array('text' => '', |
|
| 582 | 582 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label").' :', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40), |
| 583 | 583 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 584 | 584 | ); |
| 585 | 585 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1); |
| 586 | 586 | } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel |
| 587 | 587 | // Create an array for form |
| 588 | - $formquestion = array( 'text' => '', |
|
| 588 | + $formquestion = array('text' => '', |
|
| 589 | 589 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label").' :', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40), |
| 590 | 590 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 591 | 591 | ); |
@@ -881,13 +881,13 @@ discard block |
||
| 881 | 881 | print '<input type="submit" class="button buttongen marginbottomonly" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"></td>'; |
| 882 | 882 | } else { |
| 883 | 883 | print '<td class="right">'; |
| 884 | - print '<a class="editfielda reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=editline&lineid=' . $line->id . '#line_' . $line->id . '">'; |
|
| 885 | - print img_edit() . '</a>'; |
|
| 884 | + print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&lineid='.$line->id.'#line_'.$line->id.'">'; |
|
| 885 | + print img_edit().'</a>'; |
|
| 886 | 886 | print '</td>'; |
| 887 | 887 | print '<td class="right">'; |
| 888 | 888 | // Ensure the delete line link embeds a CSRF token. |
| 889 | - $deleteLineUrl = $_SERVER["PHP_SELF"] . '?id=' . $id . '&action=deleteline&lineid=' . $line->id . '&token=' . newToken(); |
|
| 890 | - print '<a href="' . $deleteLineUrl . '">' . img_delete($langs->trans("Remove")) . '</a>'; |
|
| 889 | + $deleteLineUrl = $_SERVER["PHP_SELF"].'?id='.$id.'&action=deleteline&lineid='.$line->id.'&token='.newToken(); |
|
| 890 | + print '<a href="'.$deleteLineUrl.'">'.img_delete($langs->trans("Remove")).'</a>'; |
|
| 891 | 891 | print '</td>'; |
| 892 | 892 | } |
| 893 | 893 | |
@@ -991,7 +991,7 @@ discard block |
||
| 991 | 991 | print '<td></td>'; |
| 992 | 992 | |
| 993 | 993 | // Button to add line |
| 994 | - print '<td class="right" colspan="2"><input type="submit" class="button" name="addline" value="' . dol_escape_htmltag($langs->trans('Add')) . '"></td>'; |
|
| 994 | + print '<td class="right" colspan="2"><input type="submit" class="button" name="addline" value="'.dol_escape_htmltag($langs->trans('Add')).'"></td>'; |
|
| 995 | 995 | |
| 996 | 996 | // Grad and drop lines |
| 997 | 997 | print '<td></td>'; |
@@ -1095,9 +1095,9 @@ discard block |
||
| 1095 | 1095 | // Documents |
| 1096 | 1096 | if ($includedocgeneration) { |
| 1097 | 1097 | $objref = dol_sanitizeFileName($object->ref); |
| 1098 | - $relativepath = $objref . '/' . $objref . '.pdf'; |
|
| 1098 | + $relativepath = $objref.'/'.$objref.'.pdf'; |
|
| 1099 | 1099 | $filedir = $conf->stocktransfer->dir_output.'/'.$object->element.'/'.$objref; |
| 1100 | - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; |
|
| 1100 | + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; |
|
| 1101 | 1101 | $genallowed = $permissiontoread; // If you can read, you can build the PDF to read content |
| 1102 | 1102 | $delallowed = $permissiontoadd; // If you can create/edit, you can remove a file on card |
| 1103 | 1103 | print $formfile->showdocuments('stocktransfer:StockTransfer', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); |
@@ -381,7 +381,7 @@ |
||
| 381 | 381 | * @throws RestException 404 Not found |
| 382 | 382 | * @throws RestException 500 Internal Server Error |
| 383 | 383 | * |
| 384 | - */ |
|
| 384 | + */ |
|
| 385 | 385 | public function listProducts($id = 0, $sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $includestockdata = 0, $includesubproducts = false, $includeparentid = false, $includetrans = false, $properties = '', $pagination_data = false) |
| 386 | 386 | { |
| 387 | 387 | if (!DolibarrApiAccess::$user->hasRight('stock', 'lire')) { |
@@ -397,9 +397,9 @@ |
||
| 397 | 397 | $obj_ret = array(); |
| 398 | 398 | |
| 399 | 399 | $sql = "SELECT t.rowid FROM ".MAIN_DB_PREFIX."product_stock as ps"; |
| 400 | - $sql.= " INNER JOIN ".MAIN_DB_PREFIX."product as t ON ps.fk_product = t.rowid"; |
|
| 401 | - $sql.= " WHERE ps.fk_entrepot =".((int) $id); |
|
| 402 | - $sql.= " AND t.entity IN (".getEntity('stock').")"; |
|
| 400 | + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."product as t ON ps.fk_product = t.rowid"; |
|
| 401 | + $sql .= " WHERE ps.fk_entrepot =".((int) $id); |
|
| 402 | + $sql .= " AND t.entity IN (".getEntity('stock').")"; |
|
| 403 | 403 | |
| 404 | 404 | //this query will return total warehouses with the filters given |
| 405 | 405 | $sqlTotals = str_replace('SELECT t.rowid', 'SELECT count(t.rowid) as total', $sql); |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | $this->fax = $obj->fax; |
| 581 | 581 | |
| 582 | 582 | $this->date_creation = $obj->date_creation; |
| 583 | - $this->barcode = $obj->barcode; |
|
| 583 | + $this->barcode = $obj->barcode; |
|
| 584 | 584 | $this->fk_departement = $obj->fk_departement; |
| 585 | 585 | $this->barcode_type = $obj->fk_barcode_type; |
| 586 | 586 | $this->warehouse_id = $obj->rowid; |
@@ -737,7 +737,7 @@ discard block |
||
| 737 | 737 | } |
| 738 | 738 | $sql .= " WHERE ps.fk_entrepot = ".((int) $this->id); |
| 739 | 739 | if ($separatedPMP) { |
| 740 | - $sql .= " AND pa.fk_product = p.rowid AND pa.entity = ". (int) $conf->entity; |
|
| 740 | + $sql .= " AND pa.fk_product = p.rowid AND pa.entity = ".(int) $conf->entity; |
|
| 741 | 741 | } |
| 742 | 742 | $sql .= " AND ps.fk_product = p.rowid"; |
| 743 | 743 | //print $sql; |
@@ -821,9 +821,9 @@ discard block |
||
| 821 | 821 | } |
| 822 | 822 | // show categories for this record only in ajax to not overload lists |
| 823 | 823 | if (!$nofetch && isModEnabled('category')) { |
| 824 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 824 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 825 | 825 | $form = new Form($this->db); |
| 826 | - $datas['categories_warehouse'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_WAREHOUSE, 1, 1); |
|
| 826 | + $datas['categories_warehouse'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_WAREHOUSE, 1, 1); |
|
| 827 | 827 | } |
| 828 | 828 | |
| 829 | 829 | return $datas; |
@@ -120,14 +120,14 @@ discard block |
||
| 120 | 120 | $arrayofcss = array('/takepos/css/pos.css.php', '/takepos/css/colorbox.css'); |
| 121 | 121 | |
| 122 | 122 | if (getDolGlobalInt('TAKEPOS_COLOR_THEME') == 1) { |
| 123 | - $arrayofcss[] = '/takepos/css/colorful.css'; |
|
| 123 | + $arrayofcss[] = '/takepos/css/colorful.css'; |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
| 127 | 127 | // Title |
| 128 | 128 | $title = 'TakePOS - Dolibarr '.DOL_VERSION; |
| 129 | 129 | if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { |
| 130 | - $title = 'TakePOS - ' . getDolGlobalString('MAIN_APPLICATION_TITLE'); |
|
| 130 | + $title = 'TakePOS - '.getDolGlobalString('MAIN_APPLICATION_TITLE'); |
|
| 131 | 131 | } |
| 132 | 132 | $head = '<meta name="apple-mobile-web-app-title" content="TakePOS"/> |
| 133 | 133 | <meta name="apple-mobile-web-app-capable" content="yes"> |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | limit = maxproduct - 1; |
| 351 | 351 | } |
| 352 | 352 | // Only show products for sale (tosell=1) |
| 353 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) { |
|
| 353 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) { |
|
| 354 | 354 | console.log("Call ajax.php (in LoadProducts) to get Products of category "+currentcat+" then loop on result to fill image thumbs"); |
| 355 | 355 | //console.log(data); |
| 356 | 356 | |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | var nb_cat_shown = $('.div5 div.wrapper2[data-iscat=1]').length; |
| 473 | 473 | var offset = <?php echo($MAXPRODUCT - 2); ?> * pageproducts - nb_cat_shown; |
| 474 | 474 | // Only show products for sale (tosell=1) |
| 475 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) { |
|
| 475 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) { |
|
| 476 | 476 | console.log("Call ajax.php (in MoreProducts) to get Products of category "+currentcat); |
| 477 | 477 | |
| 478 | 478 | if (typeof (data[0]) == "undefined" && moreorless=="more"){ // Return if no more pages |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | function ChangeThirdparty(idcustomer) { |
| 565 | 565 | console.log("ChangeThirdparty"); |
| 566 | 566 | // Call page list.php to change customer |
| 567 | - $("#poslines").load("<?php echo DOL_URL_ROOT ?>/societe/list.php?action=change&token=<?php echo newToken();?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() { |
|
| 567 | + $("#poslines").load("<?php echo DOL_URL_ROOT ?>/societe/list.php?action=change&token=<?php echo newToken(); ?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() { |
|
| 568 | 568 | }); |
| 569 | 569 | |
| 570 | 570 | ClearSearch(false); |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | |
| 674 | 674 | console.log("New with place = <?php echo $place; ?>, js place="+place+", invoiceid="+invoiceid); |
| 675 | 675 | |
| 676 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken();?>&id='+invoiceid, function(data) { |
|
| 676 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken(); ?>&id='+invoiceid, function(data) { |
|
| 677 | 677 | var r; |
| 678 | 678 | |
| 679 | 679 | if (parseInt(data['paye']) === 1) { |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | pageproducts = 0; |
| 755 | 755 | jQuery(".wrapper2 .catwatermark").hide(); |
| 756 | 756 | var nbsearchresults = 0; |
| 757 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&search_term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) { |
|
| 757 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken(); ?>&search_term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) { |
|
| 758 | 758 | for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) { |
| 759 | 759 | if (typeof (data[i]) == "undefined") { |
| 760 | 760 | $("#prowatermark" + i).html(""); |
@@ -849,7 +849,7 @@ discard block |
||
| 849 | 849 | } |
| 850 | 850 | else { |
| 851 | 851 | $("#prodiv<?php echo $MAXPRODUCT - 2; ?> span").show(); |
| 852 | - var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2;?>)); |
|
| 852 | + var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2; ?>)); |
|
| 853 | 853 | $("#search_start_less").val(search_start_less); |
| 854 | 854 | } |
| 855 | 855 | if (nbsearchresults != <?php echo $MAXPRODUCT - 2; ?>) { |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | } |
| 858 | 858 | else { |
| 859 | 859 | $("#prodiv<?php echo $MAXPRODUCT - 1; ?> span").show(); |
| 860 | - var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2;?>); |
|
| 860 | + var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2; ?>); |
|
| 861 | 861 | $("#search_start_more").val(search_start_more); |
| 862 | 862 | } |
| 863 | 863 | }); |
@@ -954,14 +954,14 @@ discard block |
||
| 954 | 954 | |
| 955 | 955 | function TakeposPrintingOrder(){ |
| 956 | 956 | console.log("TakeposPrintingOrder output invoice to print order"); |
| 957 | - $("#poslines").load("invoice.php?action=order&token=<?php echo newToken();?>&place="+place, function() { |
|
| 957 | + $("#poslines").load("invoice.php?action=order&token=<?php echo newToken(); ?>&place="+place, function() { |
|
| 958 | 958 | //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); |
| 959 | 959 | }); |
| 960 | 960 | } |
| 961 | 961 | |
| 962 | 962 | function TakeposPrintingTemp(){ |
| 963 | 963 | console.log("TakeposPrintingTemp"); |
| 964 | - $("#poslines").load("invoice.php?action=temp&token=<?php echo newToken();?>&place="+place, function() { |
|
| 964 | + $("#poslines").load("invoice.php?action=temp&token=<?php echo newToken(); ?>&place="+place, function() { |
|
| 965 | 965 | //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); |
| 966 | 966 | }); |
| 967 | 967 | } |
@@ -984,7 +984,7 @@ discard block |
||
| 984 | 984 | |
| 985 | 985 | /* Click on button to open drawer */ |
| 986 | 986 | function DolibarrOpenDrawer() { |
| 987 | - console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken();?>&term=<?php print urlencode(empty($_SESSION["takeposterminal"]) ? '' : $_SESSION["takeposterminal"]); ?>"); |
|
| 987 | + console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken(); ?>&term=<?php print urlencode(empty($_SESSION["takeposterminal"]) ? '' : $_SESSION["takeposterminal"]); ?>"); |
|
| 988 | 988 | $.ajax({ |
| 989 | 989 | type: "GET", |
| 990 | 990 | data: { token: '<?php echo currentToken(); ?>' }, |
@@ -1339,8 +1339,8 @@ discard block |
||
| 1339 | 1339 | |
| 1340 | 1340 | // TakePOS setup check |
| 1341 | 1341 | if (isset($_SESSION["takeposterminal"]) && $_SESSION["takeposterminal"]) { |
| 1342 | - $sql = "SELECT code, libelle FROM " . MAIN_DB_PREFIX . "c_paiement"; |
|
| 1343 | - $sql .= " WHERE entity IN (" . getEntity('c_paiement') . ")"; |
|
| 1342 | + $sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement"; |
|
| 1343 | + $sql .= " WHERE entity IN (".getEntity('c_paiement').")"; |
|
| 1344 | 1344 | $sql .= " AND active = 1"; |
| 1345 | 1345 | $sql .= " ORDER BY libelle"; |
| 1346 | 1346 | |
@@ -1356,7 +1356,7 @@ discard block |
||
| 1356 | 1356 | $paycode = 'CHEQUE'; |
| 1357 | 1357 | } |
| 1358 | 1358 | |
| 1359 | - $constantforkey = "CASHDESK_ID_BANKACCOUNT_" . $paycode . $_SESSION["takeposterminal"]; |
|
| 1359 | + $constantforkey = "CASHDESK_ID_BANKACCOUNT_".$paycode.$_SESSION["takeposterminal"]; |
|
| 1360 | 1360 | //var_dump($constantforkey.' '.getDolGlobalInt($constantforkey)); |
| 1361 | 1361 | if (getDolGlobalInt($constantforkey) > 0) { |
| 1362 | 1362 | array_push($paiementsModes, $obj); |
@@ -1398,7 +1398,7 @@ discard block |
||
| 1398 | 1398 | $menus[$r++] = array('title' => '<span class="far fa-building paddingrightonly"></span><div class="trunc">'.$langs->trans("Customer").'</div>', 'action' => 'Customer();'); |
| 1399 | 1399 | } |
| 1400 | 1400 | } |
| 1401 | -if (! getDolGlobalString('TAKEPOS_HIDE_HISTORY')) { |
|
| 1401 | +if (!getDolGlobalString('TAKEPOS_HIDE_HISTORY')) { |
|
| 1402 | 1402 | $menus[$r++] = array('title' => '<span class="fa fa-history paddingrightonly"></span><div class="trunc">'.$langs->trans("History").'</div>', 'action' => 'History();'); |
| 1403 | 1403 | } |
| 1404 | 1404 | $menus[$r++] = array('title' => '<span class="fa fa-cube paddingrightonly"></span><div class="trunc">'.$langs->trans("FreeZone").'</div>', 'action' => 'FreeZone();'); |
@@ -1428,7 +1428,7 @@ discard block |
||
| 1428 | 1428 | $customprinttemplateallowed = true; |
| 1429 | 1429 | include_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php'; |
| 1430 | 1430 | if (isALNERunningVersion()) { // No need to show this option because it has no effect when isALNERunningVersion is true. |
| 1431 | - $customprinttemplateallowed = false; // Custom printer may be allowed if mandatory information in template are guaranteed. For the moment, we prefer not allow this. |
|
| 1431 | + $customprinttemplateallowed = false; // Custom printer may be allowed if mandatory information in template are guaranteed. For the moment, we prefer not allow this. |
|
| 1432 | 1432 | } |
| 1433 | 1433 | |
| 1434 | 1434 | if (getDolGlobalString('TAKEPOS_BAR_RESTAURANT')) { |
@@ -439,7 +439,7 @@ |
||
| 439 | 439 | $customprinttemplateallowed = true; |
| 440 | 440 | include_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php'; |
| 441 | 441 | if (isALNERunningVersion()) { // No need to show the custom template when isALNERunningVersion is true because it has no effect (disabled by receipt.php). |
| 442 | - $customprinttemplateallowed = false; // Custom printer may be allowed if mandatory information in template are guaranteed. For the moment, we prefer not allow this. |
|
| 442 | + $customprinttemplateallowed = false; // Custom printer may be allowed if mandatory information in template are guaranteed. For the moment, we prefer not allow this. |
|
| 443 | 443 | } |
| 444 | 444 | |
| 445 | 445 | if (isModEnabled('receiptprinter')) { |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | */ |
| 203 | 203 | $error = 0; |
| 204 | 204 | $parameters = array(); |
| 205 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
| 205 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
| 206 | 206 | if ($reshook < 0) { |
| 207 | 207 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 208 | 208 | } |
@@ -224,9 +224,9 @@ discard block |
||
| 224 | 224 | $bankaccount = GETPOSTINT('accountid'); |
| 225 | 225 | } else { |
| 226 | 226 | if ($pay == 'LIQ') { |
| 227 | - $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
| 227 | + $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
| 228 | 228 | } elseif ($pay == "CHQ") { |
| 229 | - $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
| 229 | + $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
| 230 | 230 | } else { |
| 231 | 231 | $accountname = "CASHDESK_ID_BANKACCOUNT_".$pay.$_SESSION["takeposterminal"]; |
| 232 | 232 | $bankaccount = getDolGlobalInt($accountname); |
@@ -294,14 +294,14 @@ discard block |
||
| 294 | 294 | // The case for isModEnabled('productbatch') is processed few lines later. |
| 295 | 295 | $savconst = getDolGlobalString('STOCK_CALCULATE_ON_BILL'); |
| 296 | 296 | |
| 297 | - $conf->global->STOCK_CALCULATE_ON_BILL = 1; // To force the change of stock during invoice validation |
|
| 297 | + $conf->global->STOCK_CALCULATE_ON_BILL = 1; // To force the change of stock during invoice validation |
|
| 298 | 298 | |
| 299 | 299 | $constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
| 300 | 300 | dol_syslog("Validate invoice with stock change. Warehouse defined into constant ".$constantforkey." = ".getDolGlobalString($constantforkey)); |
| 301 | 301 | |
| 302 | 302 | // Validate invoice with stock change into warehouse getDolGlobalInt($constantforkey) |
| 303 | 303 | // Label of stock movement will be the same as when we validate invoice "Invoice XXXX validated" |
| 304 | - $batch_rule = 0; // Module productbatch is disabled here, so no need for a batch_rule. |
|
| 304 | + $batch_rule = 0; // Module productbatch is disabled here, so no need for a batch_rule. |
|
| 305 | 305 | $res = $invoice->validate($user, '', getDolGlobalInt($constantforkey), 0, $batch_rule); |
| 306 | 306 | |
| 307 | 307 | // Restore setup |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | dol_syslog("Now we record the stock movement for each qualified line"); |
| 383 | 383 | |
| 384 | 384 | // The case !isModEnabled('productbatch') was processed few lines before. |
| 385 | - require_once DOL_DOCUMENT_ROOT . "/product/stock/class/mouvementstock.class.php"; |
|
| 385 | + require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; |
|
| 386 | 386 | $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; |
| 387 | 387 | $inventorycode = dol_print_date(dol_now(), 'dayhourlog'); |
| 388 | 388 | // Label of stock movement will be "TakePOS - Invoice XXXX" |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | $creditnote->socid = $invoice->socid; |
| 434 | 434 | $creditnote->date = dol_now(); |
| 435 | 435 | $creditnote->module_source = 'takepos'; |
| 436 | - $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
| 436 | + $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
| 437 | 437 | $creditnote->type = Facture::TYPE_CREDIT_NOTE; |
| 438 | 438 | $creditnote->fk_facture_source = $placeid; |
| 439 | 439 | //$creditnote->remise_absolue = $invoice->remise_absolue; |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | // If module stock is enabled and we do not setup takepo to disable stock decrease |
| 561 | 561 | // The case for isModEnabled('productbatch') is processed few lines later. |
| 562 | 562 | $savconst = getDolGlobalString('STOCK_CALCULATE_ON_BILL'); |
| 563 | - $conf->global->STOCK_CALCULATE_ON_BILL = 1; // We force setup to have update of stock on invoice validation/unvalidation |
|
| 563 | + $conf->global->STOCK_CALCULATE_ON_BILL = 1; // We force setup to have update of stock on invoice validation/unvalidation |
|
| 564 | 564 | |
| 565 | 565 | $constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
| 566 | 566 | |
@@ -568,7 +568,7 @@ discard block |
||
| 568 | 568 | |
| 569 | 569 | // Validate invoice with stock change into warehouse getDolGlobalInt($constantforkey) |
| 570 | 570 | // Label of stock movement will be the same as when we validate invoice "Invoice XXXX validated" |
| 571 | - $batch_rule = 0; // Module productbatch is disabled here, so no need for a batch_rule. |
|
| 571 | + $batch_rule = 0; // Module productbatch is disabled here, so no need for a batch_rule. |
|
| 572 | 572 | $res = $creditnote->validate($user, '', getDolGlobalInt($constantforkey), 0, $batch_rule); |
| 573 | 573 | if ($res < 0) { |
| 574 | 574 | $error++; |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | dol_syslog("Now we record the stock movement for each qualified line"); |
| 589 | 589 | |
| 590 | 590 | // The case !isModEnabled('productbatch') was processed few lines before. |
| 591 | - require_once DOL_DOCUMENT_ROOT . "/product/stock/class/mouvementstock.class.php"; |
|
| 591 | + require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; |
|
| 592 | 592 | $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; |
| 593 | 593 | $inventorycode = dol_print_date(dol_now(), 'dayhourlog'); |
| 594 | 594 | // Label of stock movement will be "TakePOS - Invoice XXXX" |
@@ -628,7 +628,7 @@ discard block |
||
| 628 | 628 | if (!$error && $res >= 0) { |
| 629 | 629 | $db->commit(); |
| 630 | 630 | } else { |
| 631 | - $creditnote->id = $placeid; // Creation has failed, we reset to ID of source invoice so we go back to this one in action=history |
|
| 631 | + $creditnote->id = $placeid; // Creation has failed, we reset to ID of source invoice so we go back to this one in action=history |
|
| 632 | 632 | $db->rollback(); |
| 633 | 633 | } |
| 634 | 634 | } |
@@ -648,14 +648,14 @@ discard block |
||
| 648 | 648 | if (($action == "addline" || $action == "freezone") && $placeid == 0 && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) { |
| 649 | 649 | $invoice->socid = getDolGlobalInt($constforcompanyid); |
| 650 | 650 | |
| 651 | - $dolnowtzuserrel = dol_now('tzuserrel'); // If user is 02 january 22:00, we want to store '02 january' |
|
| 651 | + $dolnowtzuserrel = dol_now('tzuserrel'); // If user is 02 january 22:00, we want to store '02 january' |
|
| 652 | 652 | $monthuser = dol_print_date($dolnowtzuserrel, '%m', 'gmt'); |
| 653 | 653 | $dayuser = dol_print_date($dolnowtzuserrel, '%d', 'gmt'); |
| 654 | 654 | $yearuser = dol_print_date($dolnowtzuserrel, '%Y', 'gmt'); |
| 655 | - $dateinvoice = dol_mktime(0, 0, 0, (int) $monthuser, (int) $dayuser, (int) $yearuser, 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 655 | + $dateinvoice = dol_mktime(0, 0, 0, (int) $monthuser, (int) $dayuser, (int) $yearuser, 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 656 | 656 | |
| 657 | 657 | include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
| 658 | - $invoice->date = $dateinvoice; // Invoice::create() needs a date with no hours |
|
| 658 | + $invoice->date = $dateinvoice; // Invoice::create() needs a date with no hours |
|
| 659 | 659 | |
| 660 | 660 | /* |
| 661 | 661 | print "monthuser=".$monthuser." dayuser=".$dayuser." yearuser=".$yearuser.'<br>'; |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | */ |
| 671 | 671 | |
| 672 | 672 | $invoice->module_source = 'takepos'; |
| 673 | - $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
| 673 | + $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
| 674 | 674 | $invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity; |
| 675 | 675 | |
| 676 | 676 | if ($invoice->socid <= 0) { |
@@ -883,7 +883,7 @@ discard block |
||
| 883 | 883 | |
| 884 | 884 | // complete line by hook |
| 885 | 885 | $parameters = array('prod' => $prod, 'line' => $line); |
| 886 | - $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
| 886 | + $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
| 887 | 887 | if ($reshook < 0) { |
| 888 | 888 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 889 | 889 | } |
@@ -1098,7 +1098,7 @@ discard block |
||
| 1098 | 1098 | |
| 1099 | 1099 | if (!$permissiontoupdateline) { |
| 1100 | 1100 | dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos").' - No permission to updateprice', [], 1); |
| 1101 | - } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
| 1101 | + } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
| 1102 | 1102 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $vatratecode, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
| 1103 | 1103 | } else { |
| 1104 | 1104 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $vatratecode, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
@@ -1170,7 +1170,7 @@ discard block |
||
| 1170 | 1170 | |
| 1171 | 1171 | if ($action == "setbatch" && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) { |
| 1172 | 1172 | $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; |
| 1173 | - $warehouseid = (GETPOSTINT('warehouseid') > 0 ? GETPOSTINT('warehouseid') : getDolGlobalInt($constantforkey)); // Get the warehouse id from GETPOSTINT('warehouseid'), otherwise use default setup. |
|
| 1173 | + $warehouseid = (GETPOSTINT('warehouseid') > 0 ? GETPOSTINT('warehouseid') : getDolGlobalInt($constantforkey)); // Get the warehouse id from GETPOSTINT('warehouseid'), otherwise use default setup. |
|
| 1174 | 1174 | $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET batch = '".$db->escape($batch)."', fk_warehouse = ".((int) $warehouseid); |
| 1175 | 1175 | $sql .= " WHERE rowid=".((int) $idoflineadded); |
| 1176 | 1176 | $db->query($sql); |
@@ -1318,11 +1318,11 @@ discard block |
||
| 1318 | 1318 | $customprinttemplateallowed = true; |
| 1319 | 1319 | include_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php'; |
| 1320 | 1320 | if (isALNERunningVersion()) { // No need to show this option because it has no effect when isALNERunningVersion is true. |
| 1321 | - $customprinttemplateallowed = false; // Custom printer may be allowed if mandatory information in template are guaranteed. For the moment, we prefer not allow this. |
|
| 1321 | + $customprinttemplateallowed = false; // Custom printer may be allowed if mandatory information in template are guaranteed. For the moment, we prefer not allow this. |
|
| 1322 | 1322 | } |
| 1323 | 1323 | |
| 1324 | 1324 | if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { |
| 1325 | - $sectionwithinvoicelink .= ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">'.$langs->trans("Invoice").'</a>'; |
|
| 1325 | + $sectionwithinvoicelink .= ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">'.$langs->trans("Invoice").'</a>'; |
|
| 1326 | 1326 | } elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { |
| 1327 | 1327 | // Used when the external addon takeposconnector is installed. Deprecated. |
| 1328 | 1328 | if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) { |
@@ -1364,7 +1364,7 @@ discard block |
||
| 1364 | 1364 | if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { |
| 1365 | 1365 | $title = 'TakePOS - Dolibarr '.DOL_VERSION; |
| 1366 | 1366 | if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { |
| 1367 | - $title = 'TakePOS - ' . getDolGlobalString('MAIN_APPLICATION_TITLE'); |
|
| 1367 | + $title = 'TakePOS - '.getDolGlobalString('MAIN_APPLICATION_TITLE'); |
|
| 1368 | 1368 | } |
| 1369 | 1369 | $head = '<meta name="apple-mobile-web-app-title" content="TakePOS"/> |
| 1370 | 1370 | <meta name="apple-mobile-web-app-capable" content="yes"> |
@@ -1614,7 +1614,7 @@ discard block |
||
| 1614 | 1614 | if ($contactid > 0) { |
| 1615 | 1615 | $contact = new Contact($db); |
| 1616 | 1616 | $contact->fetch($contactid); |
| 1617 | - $s .= " - " . $contact->getFullName($langs); |
|
| 1617 | + $s .= " - ".$contact->getFullName($langs); |
|
| 1618 | 1618 | } |
| 1619 | 1619 | } |
| 1620 | 1620 | } elseif (getDolGlobalInt("TAKEPOS_NO_GENERIC_THIRDPARTY")) { |
@@ -1677,10 +1677,10 @@ discard block |
||
| 1677 | 1677 | $s = ''; |
| 1678 | 1678 | |
| 1679 | 1679 | $idwarehouse = 0; |
| 1680 | - $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
| 1680 | + $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
| 1681 | 1681 | if (isModEnabled('stock')) { |
| 1682 | 1682 | if (getDolGlobalString($constantforkey) != "1") { |
| 1683 | - $constantforkey = 'CASHDESK_ID_WAREHOUSE'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
| 1683 | + $constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
| 1684 | 1684 | $idwarehouse = getDolGlobalInt($constantforkey); |
| 1685 | 1685 | if ($idwarehouse > 0) { |
| 1686 | 1686 | $s = '<span class="small">'; |
@@ -1790,11 +1790,11 @@ discard block |
||
| 1790 | 1790 | } |
| 1791 | 1791 | |
| 1792 | 1792 | $buttontocreatecreditnote = ''; |
| 1793 | -if (($action == "valid" || $action == "history" || ($action == "addline" && $invoice->status == $invoice::STATUS_CLOSED)) && $invoice->type != Facture::TYPE_CREDIT_NOTE && !getDolGlobalString('TAKEPOS_NO_CREDITNOTE')) { |
|
| 1793 | +if (($action == "valid" || $action == "history" || ($action == "addline" && $invoice->status == $invoice::STATUS_CLOSED)) && $invoice->type != Facture::TYPE_CREDIT_NOTE && !getDolGlobalString('TAKEPOS_NO_CREDITNOTE')) { |
|
| 1794 | 1794 | $buttontocreatecreditnote .= ' <!-- Show button to create a credit note -->'."\n"; |
| 1795 | 1795 | $buttontocreatecreditnote .= '<button id="buttonprint" type="button" onclick="ModalBox(\'ModalCreditNote\')">'.$langs->trans('CreateCreditNote').'</button>'; |
| 1796 | 1796 | if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { |
| 1797 | - $buttontocreatecreditnote .= ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . urlencode($invoice->ref . '/' . $invoice->ref . '.pdf').'">'.$langs->trans("Invoice").'</a>'; |
|
| 1797 | + $buttontocreatecreditnote .= ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.urlencode($invoice->ref.'/'.$invoice->ref.'.pdf').'">'.$langs->trans("Invoice").'</a>'; |
|
| 1798 | 1798 | } |
| 1799 | 1799 | } |
| 1800 | 1800 | |
@@ -1846,7 +1846,7 @@ discard block |
||
| 1846 | 1846 | |
| 1847 | 1847 | // Complete header by hook |
| 1848 | 1848 | $parameters = array(); |
| 1849 | -$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
| 1849 | +$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
| 1850 | 1850 | if ($reshook < 0) { |
| 1851 | 1851 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 1852 | 1852 | } |
@@ -1860,16 +1860,16 @@ discard block |
||
| 1860 | 1860 | print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>'; |
| 1861 | 1861 | if (getDolGlobalString('TAKEPOS_SHOW_HT')) { |
| 1862 | 1862 | print '<td class="linecolht right nowraponall">'; |
| 1863 | - print '<span class="opacitymedium small">' . $langs->trans('TotalHTShort') . '</span><br>'; |
|
| 1863 | + print '<span class="opacitymedium small">'.$langs->trans('TotalHTShort').'</span><br>'; |
|
| 1864 | 1864 | // In phone version only show when it is invoice page |
| 1865 | 1865 | if (empty($mobilepage) || $mobilepage == "invoice") { |
| 1866 | - print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">' . price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency) . '</span>'; |
|
| 1866 | + print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">'.price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency).'</span>'; |
|
| 1867 | 1867 | if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]) && $conf->currency != $_SESSION["takeposcustomercurrency"]) { |
| 1868 | 1868 | //Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency |
| 1869 | - include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; |
|
| 1869 | + include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; |
|
| 1870 | 1870 | $multicurrency = new MultiCurrency($db); |
| 1871 | 1871 | $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); |
| 1872 | - print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
| 1872 | + print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">('.price($invoice->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
| 1873 | 1873 | } |
| 1874 | 1874 | } |
| 1875 | 1875 | print '</td>'; |
@@ -2016,7 +2016,7 @@ discard block |
||
| 2016 | 2016 | |
| 2017 | 2017 | // complete line by hook |
| 2018 | 2018 | $parameters = array('line' => $line); |
| 2019 | - $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
| 2019 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
| 2020 | 2020 | if ($reshook < 0) { |
| 2021 | 2021 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 2022 | 2022 | } |
@@ -2071,7 +2071,7 @@ discard block |
||
| 2071 | 2071 | } |
| 2072 | 2072 | } |
| 2073 | 2073 | if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { |
| 2074 | - $htmlforlines .= $form->textwithpicto($line->product_label ? '<b>' . $line->product_ref . '</b> - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
|
| 2074 | + $htmlforlines .= $form->textwithpicto($line->product_label ? '<b>'.$line->product_ref.'</b> - '.$line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
|
| 2075 | 2075 | } elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) { |
| 2076 | 2076 | $htmlforlines .= $form->textwithpicto($line->product_ref ? '<b>'.$line->product_ref.'<b>' : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
| 2077 | 2077 | } else { |
@@ -2129,7 +2129,7 @@ discard block |
||
| 2129 | 2129 | |
| 2130 | 2130 | // complete line by hook |
| 2131 | 2131 | $parameters = array('line' => $line); |
| 2132 | - $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
| 2132 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
| 2133 | 2133 | if ($reshook < 0) { |
| 2134 | 2134 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 2135 | 2135 | } |