@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | public $cond_reglement_id; |
| 168 | 168 | public $cond_reglement_code; |
| 169 | - public $cond_reglement_label; // Label |
|
| 170 | - public $cond_reglement_doc; // Label on documents |
|
| 169 | + public $cond_reglement_label; // Label |
|
| 170 | + public $cond_reglement_doc; // Label on documents |
|
| 171 | 171 | |
| 172 | 172 | /** |
| 173 | 173 | * @var int ID |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | $this->ref_supplier = $obj->ref_supplier; |
| 426 | 426 | $this->socid = $obj->fk_soc; |
| 427 | 427 | $this->fourn_id = $obj->fk_soc; |
| 428 | - $this->statut = $obj->status; // deprecated |
|
| 428 | + $this->statut = $obj->status; // deprecated |
|
| 429 | 429 | $this->status = $obj->status; |
| 430 | 430 | $this->billed = $obj->billed; |
| 431 | 431 | $this->user_author_id = $obj->user_author_id; |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | $this->fk_project = $obj->fk_project; |
| 457 | 457 | $this->cond_reglement_id = $obj->fk_cond_reglement; |
| 458 | 458 | $this->cond_reglement_code = $obj->cond_reglement_code; |
| 459 | - $this->cond_reglement = $obj->cond_reglement_label; // deprecated |
|
| 459 | + $this->cond_reglement = $obj->cond_reglement_label; // deprecated |
|
| 460 | 460 | $this->cond_reglement_label = $obj->cond_reglement_label; |
| 461 | 461 | $this->cond_reglement_doc = $obj->cond_reglement_doc; |
| 462 | 462 | $this->fk_account = $obj->fk_account; |
@@ -590,10 +590,10 @@ discard block |
||
| 590 | 590 | $sqlsearchpackage .= ' WHERE entity IN ('.getEntity('product_fournisseur_price').")"; |
| 591 | 591 | $sqlsearchpackage .= " AND fk_product = ".((int) $objp->fk_product); |
| 592 | 592 | $sqlsearchpackage .= " AND ref_fourn = '".$this->db->escape($objp->ref_supplier)."'"; |
| 593 | - $sqlsearchpackage .= " AND quantity <= ".((float) $objp->qty); // required to be qualified |
|
| 594 | - $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= ".((float) $objp->qty).")"; // required to be qualified |
|
| 593 | + $sqlsearchpackage .= " AND quantity <= ".((float) $objp->qty); // required to be qualified |
|
| 594 | + $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= ".((float) $objp->qty).")"; // required to be qualified |
|
| 595 | 595 | $sqlsearchpackage .= " AND fk_soc = ".((int) $this->socid); |
| 596 | - $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first |
|
| 596 | + $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first |
|
| 597 | 597 | $sqlsearchpackage .= " LIMIT 1"; |
| 598 | 598 | |
| 599 | 599 | $resqlsearchpackage = $this->db->query($sqlsearchpackage); |
@@ -745,7 +745,7 @@ discard block |
||
| 745 | 745 | if (!$error) { |
| 746 | 746 | $result = 1; |
| 747 | 747 | $this->status = self::STATUS_VALIDATED; |
| 748 | - $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 748 | + $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 749 | 749 | $this->ref = $num; |
| 750 | 750 | } |
| 751 | 751 | |
@@ -957,7 +957,7 @@ discard block |
||
| 957 | 957 | $label = $langs->trans("ShowOrder"); |
| 958 | 958 | $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
| 959 | 959 | } |
| 960 | - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
| 960 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
| 961 | 961 | $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; |
| 962 | 962 | } |
| 963 | 963 | |
@@ -989,7 +989,7 @@ discard block |
||
| 989 | 989 | } |
| 990 | 990 | |
| 991 | 991 | global $action; |
| 992 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 992 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 993 | 993 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
| 994 | 994 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 995 | 995 | if ($reshook > 0) { |
@@ -1441,7 +1441,7 @@ discard block |
||
| 1441 | 1441 | $this->multicurrency_tx = 1; |
| 1442 | 1442 | } |
| 1443 | 1443 | |
| 1444 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 1444 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 1445 | 1445 | $this->status = self::STATUS_DRAFT; |
| 1446 | 1446 | |
| 1447 | 1447 | $sql = "INSERT INTO ".$this->db->prefix()."commande_fournisseur ("; |
@@ -1898,7 +1898,7 @@ discard block |
||
| 1898 | 1898 | $this->db->begin(); |
| 1899 | 1899 | |
| 1900 | 1900 | $product_type = $type; |
| 1901 | - $label = ''; // deprecated |
|
| 1901 | + $label = ''; // deprecated |
|
| 1902 | 1902 | |
| 1903 | 1903 | if ($fk_product > 0) { |
| 1904 | 1904 | if (getDolGlobalString('SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY')) { // Not the common case |
@@ -2041,7 +2041,7 @@ discard block |
||
| 2041 | 2041 | $this->line->total_localtax2 = $total_localtax2; |
| 2042 | 2042 | $this->line->total_ttc = $total_ttc; |
| 2043 | 2043 | $this->line->product_type = $type; |
| 2044 | - $this->line->special_code = (!empty($this->special_code) ? $this->special_code : 0); |
|
| 2044 | + $this->line->special_code = (!empty($this->special_code) ? $this->special_code : 0); |
|
| 2045 | 2045 | $this->line->origin = $origin; |
| 2046 | 2046 | $this->line->origin_id = $origin_id; |
| 2047 | 2047 | $this->line->fk_unit = $fk_unit; |
@@ -2178,7 +2178,7 @@ discard block |
||
| 2178 | 2178 | |
| 2179 | 2179 | // Method change if qty < 0 |
| 2180 | 2180 | if (getDolGlobalString('SUPPLIER_ORDER_ALLOW_NEGATIVE_QTY_FOR_SUPPLIER_ORDER_RETURN') && $qty < 0) { |
| 2181 | - $result = $mouv->livraison($user, $product, $entrepot, $qty*(-1), $price, $comment, $now, $eatby, $sellby, $batch, 0, $inventorycode); |
|
| 2181 | + $result = $mouv->livraison($user, $product, $entrepot, $qty * (-1), $price, $comment, $now, $eatby, $sellby, $batch, 0, $inventorycode); |
|
| 2182 | 2182 | } else { |
| 2183 | 2183 | $result = $mouv->reception($user, $product, $entrepot, $qty, $price, $comment, $eatby, $sellby, $batch, '', 0, $inventorycode); |
| 2184 | 2184 | } |
@@ -3247,7 +3247,7 @@ discard block |
||
| 3247 | 3247 | global $conf, $langs; |
| 3248 | 3248 | |
| 3249 | 3249 | if (!dol_strlen($modele)) { |
| 3250 | - $modele = ''; // No doc template/generation by default |
|
| 3250 | + $modele = ''; // No doc template/generation by default |
|
| 3251 | 3251 | |
| 3252 | 3252 | if (!empty($this->model_pdf)) { |
| 3253 | 3253 | $modele = $this->model_pdf; |
@@ -3613,7 +3613,7 @@ discard block |
||
| 3613 | 3613 | $return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
| 3614 | 3614 | } |
| 3615 | 3615 | if (property_exists($this, 'socid') || property_exists($this, 'total_tva')) { |
| 3616 | - $return .='<br><span class="info-box-label amount">'.$this->socid.'</span>'; |
|
| 3616 | + $return .= '<br><span class="info-box-label amount">'.$this->socid.'</span>'; |
|
| 3617 | 3617 | } |
| 3618 | 3618 | if (property_exists($this, 'billed')) { |
| 3619 | 3619 | $return .= '<br><span class="opacitymedium">'.$langs->trans("Billed").' : </span><span class="info-box-label">'.yn($this->billed).'</span>'; |
@@ -3775,10 +3775,10 @@ discard block |
||
| 3775 | 3775 | $sqlsearchpackage .= ' WHERE entity IN ('.getEntity('product_fournisseur_price').")"; |
| 3776 | 3776 | $sqlsearchpackage .= " AND fk_product = ".((int) $objp->fk_product); |
| 3777 | 3777 | $sqlsearchpackage .= " AND ref_fourn = '".$this->db->escape($objp->ref_supplier)."'"; |
| 3778 | - $sqlsearchpackage .= " AND quantity <= ".((float) $objp->qty); // required to be qualified |
|
| 3779 | - $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= ".((float) $objp->qty).")"; // required to be qualified |
|
| 3778 | + $sqlsearchpackage .= " AND quantity <= ".((float) $objp->qty); // required to be qualified |
|
| 3779 | + $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= ".((float) $objp->qty).")"; // required to be qualified |
|
| 3780 | 3780 | $sqlsearchpackage .= " AND fk_soc = ".((int) $objp->socid); |
| 3781 | - $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first |
|
| 3781 | + $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first |
|
| 3782 | 3782 | $sqlsearchpackage .= " LIMIT 1"; |
| 3783 | 3783 | |
| 3784 | 3784 | $resqlsearchpackage = $this->db->query($sqlsearchpackage); |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | /** |
| 223 | 223 | * @var int ID |
| 224 | 224 | */ |
| 225 | - public $fk_account; // default bank account |
|
| 225 | + public $fk_account; // default bank account |
|
| 226 | 226 | |
| 227 | 227 | /** |
| 228 | 228 | * @var int transport mode id |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | if ($this->fac_rec > 0) { |
| 415 | 415 | $this->fk_fac_rec_source = $this->fac_rec; |
| 416 | 416 | |
| 417 | - require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture-rec.class.php'; |
|
| 417 | + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture-rec.class.php'; |
|
| 418 | 418 | $_facrec = new FactureFournisseurRec($this->db); |
| 419 | 419 | $result = $_facrec->fetch($this->fac_rec); |
| 420 | 420 | $result = $_facrec->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0); // This load $_facrec->linkedObjectsIds |
@@ -447,13 +447,13 @@ discard block |
||
| 447 | 447 | $this->location_incoterms = $_facrec->location_incoterms; |
| 448 | 448 | |
| 449 | 449 | // Clean parameters |
| 450 | - if (! $this->type) { |
|
| 450 | + if (!$this->type) { |
|
| 451 | 451 | $this->type = self::TYPE_STANDARD; |
| 452 | 452 | } |
| 453 | 453 | if (!empty(GETPOST('ref_supplier'))) { |
| 454 | 454 | $this->ref_supplier = trim($this->ref_supplier); |
| 455 | 455 | } else { |
| 456 | - $this->ref_supplier = trim($this->ref_supplier . '_' . ($_facrec->nb_gen_done + 1)); |
|
| 456 | + $this->ref_supplier = trim($this->ref_supplier.'_'.($_facrec->nb_gen_done + 1)); |
|
| 457 | 457 | } |
| 458 | 458 | $this->note_public = trim($this->note_public); |
| 459 | 459 | $this->note_private = trim($this->note_private); |
@@ -461,11 +461,11 @@ discard block |
||
| 461 | 461 | |
| 462 | 462 | $this->array_options = $_facrec->array_options; |
| 463 | 463 | |
| 464 | - if (! $this->mode_reglement_id) { |
|
| 464 | + if (!$this->mode_reglement_id) { |
|
| 465 | 465 | $this->mode_reglement_id = 0; |
| 466 | 466 | } |
| 467 | 467 | $this->status = self::STATUS_DRAFT; |
| 468 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 468 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 469 | 469 | |
| 470 | 470 | $this->linked_objects = $_facrec->linkedObjectsIds; |
| 471 | 471 | // We do not add link to template invoice or next invoice will be linked to all generated invoices |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | /* |
| 715 | 715 | * Insert lines of template invoices |
| 716 | 716 | */ |
| 717 | - if (! $error && $this->fac_rec > 0) { |
|
| 717 | + if (!$error && $this->fac_rec > 0) { |
|
| 718 | 718 | foreach ($_facrec->lines as $i => $val) { |
| 719 | 719 | if ($_facrec->lines[$i]->fk_product) { |
| 720 | 720 | $prod = new Product($this->db); |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | $localtax1_tx=get_localtax($tva_tx,1,$soc,$mysoc,$tva_npr); |
| 730 | 730 | $localtax2_tx=get_localtax($tva_tx,2,$soc,$mysoc,$tva_npr); |
| 731 | 731 | */ |
| 732 | - $tva_tx = $_facrec->lines[$i]->tva_tx . ($_facrec->lines[$i]->vat_src_code ? '(' . $_facrec->lines[$i]->vat_src_code . ')' : ''); |
|
| 732 | + $tva_tx = $_facrec->lines[$i]->tva_tx.($_facrec->lines[$i]->vat_src_code ? '('.$_facrec->lines[$i]->vat_src_code.')' : ''); |
|
| 733 | 733 | $tva_npr = $_facrec->lines[$i]->info_bits; |
| 734 | 734 | if (empty($tva_tx)) { |
| 735 | 735 | $tva_npr = 0; |
@@ -741,8 +741,8 @@ discard block |
||
| 741 | 741 | $buyprice = empty($_facrec->lines[$i]->buyprice) ? 0 : $_facrec->lines[$i]->buyprice; |
| 742 | 742 | |
| 743 | 743 | // If buyprice not defined from template invoice, we try to guess the best value |
| 744 | - if (! $buyprice && $_facrec->lines[$i]->fk_product > 0) { |
|
| 745 | - require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.product.class.php'; |
|
| 744 | + if (!$buyprice && $_facrec->lines[$i]->fk_product > 0) { |
|
| 745 | + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; |
|
| 746 | 746 | $producttmp = new ProductFournisseur($this->db); |
| 747 | 747 | $producttmp->fetch($_facrec->lines[$i]->fk_product); |
| 748 | 748 | |
@@ -927,11 +927,11 @@ discard block |
||
| 927 | 927 | $this->id = $obj->rowid; |
| 928 | 928 | $this->ref = $obj->ref ? $obj->ref : $obj->rowid; // We take rowid if ref is empty for backward compatibility |
| 929 | 929 | |
| 930 | - $this->ref_supplier = $obj->ref_supplier; |
|
| 931 | - $this->ref_ext = $obj->ref_ext; |
|
| 932 | - $this->entity = $obj->entity; |
|
| 930 | + $this->ref_supplier = $obj->ref_supplier; |
|
| 931 | + $this->ref_ext = $obj->ref_ext; |
|
| 932 | + $this->entity = $obj->entity; |
|
| 933 | 933 | $this->type = empty($obj->type) ? self::TYPE_STANDARD : $obj->type; |
| 934 | - $this->subtype = $obj->subtype; |
|
| 934 | + $this->subtype = $obj->subtype; |
|
| 935 | 935 | $this->socid = $obj->fk_soc; |
| 936 | 936 | $this->datec = $this->db->jdate($obj->datec); |
| 937 | 937 | $this->date = $this->db->jdate($obj->datef); |
@@ -949,13 +949,13 @@ discard block |
||
| 949 | 949 | $this->total_tva = $obj->total_tva; |
| 950 | 950 | $this->total_ttc = $obj->total_ttc; |
| 951 | 951 | $this->status = $obj->status; |
| 952 | - $this->statut = $obj->status; // For backward compatibility |
|
| 953 | - $this->fk_statut = $obj->status; // For backward compatibility |
|
| 952 | + $this->statut = $obj->status; // For backward compatibility |
|
| 953 | + $this->fk_statut = $obj->status; // For backward compatibility |
|
| 954 | 954 | $this->user_creation_id = $obj->fk_user_author; |
| 955 | - $this->author = $obj->fk_user_author; // deprecated |
|
| 955 | + $this->author = $obj->fk_user_author; // deprecated |
|
| 956 | 956 | $this->user_validation_id = $obj->fk_user_valid; |
| 957 | 957 | $this->fk_facture_source = $obj->fk_facture_source; |
| 958 | - $this->vat_reverse_charge = empty($obj->vat_reverse_charge) ? '0' : '1'; |
|
| 958 | + $this->vat_reverse_charge = empty($obj->vat_reverse_charge) ? '0' : '1'; |
|
| 959 | 959 | $this->fk_fac_rec_source = $obj->fk_fac_rec_source; |
| 960 | 960 | $this->fk_project = $obj->fk_project; |
| 961 | 961 | $this->cond_reglement_id = $obj->fk_cond_reglement; |
@@ -990,7 +990,7 @@ discard block |
||
| 990 | 990 | |
| 991 | 991 | $this->extraparams = isset($obj->extraparams) ? (array) json_decode($obj->extraparams, true) : array(); |
| 992 | 992 | |
| 993 | - $this->socid = $obj->socid; |
|
| 993 | + $this->socid = $obj->socid; |
|
| 994 | 994 | |
| 995 | 995 | // Retrieve all extrafield |
| 996 | 996 | // fetch optionals attributes and labels |
@@ -1056,11 +1056,11 @@ discard block |
||
| 1056 | 1056 | $line->date_end = $obj->date_end; |
| 1057 | 1057 | $line->product_ref = $obj->product_ref; |
| 1058 | 1058 | $line->ref = $obj->product_ref; |
| 1059 | - $line->ref_supplier = $obj->ref_supplier; |
|
| 1059 | + $line->ref_supplier = $obj->ref_supplier; |
|
| 1060 | 1060 | $line->libelle = $obj->label; |
| 1061 | 1061 | $line->label = $obj->label; |
| 1062 | 1062 | $line->product_barcode = $obj->product_barcode; |
| 1063 | - $line->product_desc = $obj->product_desc; |
|
| 1063 | + $line->product_desc = $obj->product_desc; |
|
| 1064 | 1064 | $line->subprice = $obj->pu_ht; |
| 1065 | 1065 | $line->pu_ht = $obj->pu_ht; |
| 1066 | 1066 | $line->pu_ttc = $obj->pu_ttc; |
@@ -1070,7 +1070,7 @@ discard block |
||
| 1070 | 1070 | $line->localtax2_tx = $obj->localtax2_tx; |
| 1071 | 1071 | $line->localtax1_type = $obj->localtax1_type; |
| 1072 | 1072 | $line->localtax2_type = $obj->localtax2_type; |
| 1073 | - $line->qty = $obj->qty; |
|
| 1073 | + $line->qty = $obj->qty; |
|
| 1074 | 1074 | $line->remise_percent = $obj->remise_percent; |
| 1075 | 1075 | $line->fk_remise_except = $obj->fk_remise_except; |
| 1076 | 1076 | //$line->tva = $obj->total_tva; // deprecated |
@@ -1353,7 +1353,7 @@ discard block |
||
| 1353 | 1353 | $facligne->rang = 1; |
| 1354 | 1354 | $linecount = count($this->lines); |
| 1355 | 1355 | for ($ii = 1; $ii <= $linecount; $ii++) { |
| 1356 | - $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1); |
|
| 1356 | + $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); |
|
| 1357 | 1357 | } |
| 1358 | 1358 | } |
| 1359 | 1359 | |
@@ -2709,7 +2709,7 @@ discard block |
||
| 2709 | 2709 | |
| 2710 | 2710 | while ($obj = $this->db->fetch_object($resql)) { |
| 2711 | 2711 | $facturestatic->date_echeance = $this->db->jdate($obj->datefin); |
| 2712 | - $facturestatic->statut = $obj->status; // For backward compatibility |
|
| 2712 | + $facturestatic->statut = $obj->status; // For backward compatibility |
|
| 2713 | 2713 | $facturestatic->status = $obj->status; |
| 2714 | 2714 | |
| 2715 | 2715 | $response->nbtodo++; |
@@ -2891,7 +2891,7 @@ discard block |
||
| 2891 | 2891 | $label = $langs->trans("ShowSupplierInvoice"); |
| 2892 | 2892 | $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
| 2893 | 2893 | } |
| 2894 | - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
| 2894 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
| 2895 | 2895 | $linkclose .= $dataparams.' class="'.$classfortooltip.'"'; |
| 2896 | 2896 | } |
| 2897 | 2897 | |
@@ -2920,7 +2920,7 @@ discard block |
||
| 2920 | 2920 | } |
| 2921 | 2921 | } |
| 2922 | 2922 | global $action; |
| 2923 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 2923 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 2924 | 2924 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
| 2925 | 2925 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 2926 | 2926 | if ($reshook > 0) { |
@@ -2951,7 +2951,7 @@ discard block |
||
| 2951 | 2951 | |
| 2952 | 2952 | $mybool = false; |
| 2953 | 2953 | |
| 2954 | - $file = getDolGlobalString('INVOICE_SUPPLIER_ADDON_NUMBER') . ".php"; |
|
| 2954 | + $file = getDolGlobalString('INVOICE_SUPPLIER_ADDON_NUMBER').".php"; |
|
| 2955 | 2955 | $classname = $conf->global->INVOICE_SUPPLIER_ADDON_NUMBER; |
| 2956 | 2956 | |
| 2957 | 2957 | // Include file with class |
@@ -3142,7 +3142,7 @@ discard block |
||
| 3142 | 3142 | // Load source object |
| 3143 | 3143 | $object->fetch($fromid); |
| 3144 | 3144 | $object->id = 0; |
| 3145 | - $object->statut = self::STATUS_DRAFT; // For backward compatibility |
|
| 3145 | + $object->statut = self::STATUS_DRAFT; // For backward compatibility |
|
| 3146 | 3146 | $object->status = self::STATUS_DRAFT; |
| 3147 | 3147 | |
| 3148 | 3148 | $object->fetch_thirdparty(); // We need it to recalculate VAT localtaxes according to main sale taxes and vendor |
@@ -3680,7 +3680,7 @@ discard block |
||
| 3680 | 3680 | $this->localtax1_type = $obj->localtax1_type; |
| 3681 | 3681 | $this->localtax2_type = $obj->localtax2_type; |
| 3682 | 3682 | |
| 3683 | - $this->qty = $obj->qty; |
|
| 3683 | + $this->qty = $obj->qty; |
|
| 3684 | 3684 | $this->remise_percent = $obj->remise_percent; |
| 3685 | 3685 | $this->fk_remise_except = $obj->fk_remise_except; |
| 3686 | 3686 | //$this->tva = $obj->total_tva; // deprecated |
@@ -51,21 +51,21 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $socid = GETPOST('socid', 'int'); |
| 53 | 53 | |
| 54 | -$search_ref = GETPOST('search_ref', 'alpha'); |
|
| 55 | -$search_date_startday = GETPOST('search_date_startday', 'int'); |
|
| 56 | -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); |
|
| 57 | -$search_date_startyear = GETPOST('search_date_startyear', 'int'); |
|
| 54 | +$search_ref = GETPOST('search_ref', 'alpha'); |
|
| 55 | +$search_date_startday = GETPOST('search_date_startday', 'int'); |
|
| 56 | +$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); |
|
| 57 | +$search_date_startyear = GETPOST('search_date_startyear', 'int'); |
|
| 58 | 58 | $search_date_endday = GETPOST('search_date_endday', 'int'); |
| 59 | -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
|
| 59 | +$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
|
| 60 | 60 | $search_date_endyear = GETPOST('search_date_endyear', 'int'); |
| 61 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 61 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 62 | 62 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 63 | 63 | $search_company = GETPOST('search_company', 'alpha'); |
| 64 | 64 | $search_payment_type = GETPOST('search_payment_type'); |
| 65 | -$search_cheque_num = GETPOST('search_cheque_num', 'alpha'); |
|
| 65 | +$search_cheque_num = GETPOST('search_cheque_num', 'alpha'); |
|
| 66 | 66 | $search_bank_account = GETPOST('search_bank_account', 'int'); |
| 67 | -$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x' |
|
| 68 | -$search_sale = GETPOST('search_sale', 'int'); |
|
| 67 | +$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x' |
|
| 68 | +$search_sale = GETPOST('search_sale', 'int'); |
|
| 69 | 69 | |
| 70 | 70 | $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
| 71 | 71 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
@@ -205,10 +205,10 @@ discard block |
||
| 205 | 205 | $sql .= natural_search('p.ref', $search_ref); |
| 206 | 206 | } |
| 207 | 207 | if ($search_date_start) { |
| 208 | - $sql .= " AND p.datep >= '" . $db->idate($search_date_start) . "'"; |
|
| 208 | + $sql .= " AND p.datep >= '".$db->idate($search_date_start)."'"; |
|
| 209 | 209 | } |
| 210 | 210 | if ($search_date_end) { |
| 211 | - $sql .=" AND p.datep <= '" . $db->idate($search_date_end) . "'"; |
|
| 211 | + $sql .= " AND p.datep <= '".$db->idate($search_date_end)."'"; |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | if ($search_company) { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | public $socid; |
| 62 | 62 | |
| 63 | 63 | public $datepaye; |
| 64 | - public $date; // same than $datepaye |
|
| 64 | + public $date; // same than $datepaye |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * @deprecated |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | public $pos_change = 0; // Excess received in TakePOS cash payment |
| 86 | 86 | |
| 87 | 87 | public $author; |
| 88 | - public $paiementid; // ID of mode of payment. Is saved into fields fk_paiement on llx_paiement = id of llx_c_paiement |
|
| 89 | - public $paiementcode; // Code of mode of payment. |
|
| 88 | + public $paiementid; // ID of mode of payment. Is saved into fields fk_paiement on llx_paiement = id of llx_c_paiement |
|
| 89 | + public $paiementcode; // Code of mode of payment. |
|
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * @var string Type of payment label |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | global $conf, $langs; |
| 249 | 249 | |
| 250 | 250 | $error = 0; |
| 251 | - $way = $this->getWay(); // 'dolibarr' to use amount, 'customer' to use foreign multicurrency amount |
|
| 251 | + $way = $this->getWay(); // 'dolibarr' to use amount, 'customer' to use foreign multicurrency amount |
|
| 252 | 252 | |
| 253 | 253 | $now = dol_now(); |
| 254 | 254 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | $this->error = $hookmanager->error; |
| 407 | 407 | $error++; |
| 408 | 408 | } elseif ($reshook == 0) { |
| 409 | - dol_syslog("Remain to pay for invoice " . $facid . " not null. We do nothing more."); |
|
| 409 | + dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); |
|
| 410 | 410 | } |
| 411 | 411 | // } else if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more."); |
| 412 | 412 | } else { |
@@ -689,8 +689,8 @@ discard block |
||
| 689 | 689 | |
| 690 | 690 | // if dolibarr currency != bank currency then we received an amount in customer currency (currently I don't manage the case : my currency is USD, the customer currency is EUR and he paid me in GBP. Seems no sense for me) |
| 691 | 691 | if (isModEnabled('multicurrency') && $conf->currency != $acc->currency_code) { |
| 692 | - $totalamount = $this->multicurrency_amount; // We will insert into llx_bank.amount in foreign currency |
|
| 693 | - $totalamount_main_currency = $this->amount; // We will also save the amount in main currency into column llx_bank.amount_main_currency |
|
| 692 | + $totalamount = $this->multicurrency_amount; // We will insert into llx_bank.amount in foreign currency |
|
| 693 | + $totalamount_main_currency = $this->amount; // We will also save the amount in main currency into column llx_bank.amount_main_currency |
|
| 694 | 694 | } |
| 695 | 695 | |
| 696 | 696 | if ($mode == 'payment_supplier') { |
@@ -800,7 +800,7 @@ discard block |
||
| 800 | 800 | |
| 801 | 801 | // Add link to the Direct Debit if invoice redused ('InvoiceRefused') in bank_url |
| 802 | 802 | if (!$error && $label == '(InvoiceRefused)') { |
| 803 | - $result=$acc->add_url_line( |
|
| 803 | + $result = $acc->add_url_line( |
|
| 804 | 804 | $bank_line_id, |
| 805 | 805 | $this->id_prelevement, |
| 806 | 806 | DOL_URL_ROOT.'/compta/prelevement/card.php?id=', |
@@ -1124,7 +1124,7 @@ discard block |
||
| 1124 | 1124 | if (getDolGlobalString('PAYMENT_ADDON')) { |
| 1125 | 1125 | $mybool = false; |
| 1126 | 1126 | |
| 1127 | - $file = getDolGlobalString('PAYMENT_ADDON') . ".php"; |
|
| 1127 | + $file = getDolGlobalString('PAYMENT_ADDON').".php"; |
|
| 1128 | 1128 | $classname = $conf->global->PAYMENT_ADDON; |
| 1129 | 1129 | |
| 1130 | 1130 | // Include file with class |
@@ -1141,8 +1141,8 @@ discard block |
||
| 1141 | 1141 | |
| 1142 | 1142 | // For compatibility |
| 1143 | 1143 | if (!$mybool) { |
| 1144 | - $file = getDolGlobalString('PAYMENT_ADDON') . ".php"; |
|
| 1145 | - $classname = "mod_payment_" . getDolGlobalString('PAYMENT_ADDON'); |
|
| 1144 | + $file = getDolGlobalString('PAYMENT_ADDON').".php"; |
|
| 1145 | + $classname = "mod_payment_".getDolGlobalString('PAYMENT_ADDON'); |
|
| 1146 | 1146 | $classname = preg_replace('/\-.*$/', '', $classname); |
| 1147 | 1147 | // Include file with class |
| 1148 | 1148 | foreach ($conf->file->dol_document_root as $dirroot) { |
@@ -1302,7 +1302,7 @@ discard block |
||
| 1302 | 1302 | } |
| 1303 | 1303 | $result .= $linkend; |
| 1304 | 1304 | global $action; |
| 1305 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 1305 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 1306 | 1306 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
| 1307 | 1307 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 1308 | 1308 | if ($reshook > 0) { |
@@ -119,7 +119,9 @@ |
||
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | // Security check |
| 122 | -if ($user->socid) $socid = $user->socid; |
|
| 122 | +if ($user->socid) { |
|
| 123 | + $socid = $user->socid; |
|
| 124 | +} |
|
| 123 | 125 | $result = restrictedArea($user, 'facture', $facid, ''); |
| 124 | 126 | |
| 125 | 127 | |