Merge pull request #10640 from ptibogxiv/patch-122

FIX fetch module / pos source
This commit is contained in:
Laurent Destailleur 2019-02-23 15:59:22 +01:00 committed by GitHub
commit 0298582fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1327,6 +1327,7 @@ class Facture extends CommonInvoice
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
$sql.= ', f.fk_incoterms, f.location_incoterms';
$sql.= ', f.module_source, f.pos_source';
$sql.= ", i.libelle as libelle_incoterms";
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid';
@ -1360,7 +1361,7 @@ class Facture extends CommonInvoice
$this->date_pointoftax = $this->db->jdate($obj->date_pointoftax);
$this->date_creation = $this->db->jdate($obj->datec);
$this->date_validation = $this->db->jdate($obj->datev);
$this->date_modification = $this->db->jdate($obj->datem);
$this->date_modification = $this->db->jdate($obj->datem);
$this->datem = $this->db->jdate($obj->datem);
$this->remise_percent = $obj->remise_percent;
$this->remise_absolue = $obj->remise_absolue;
@ -1399,9 +1400,11 @@ class Facture extends CommonInvoice
$this->extraparams = (array) json_decode($obj->extraparams, true);
//Incoterms
$this->fk_incoterms = $obj->fk_incoterms;
$this->location_incoterms = $obj->location_incoterms;
$this->libelle_incoterms = $obj->libelle_incoterms;
$this->fk_incoterms = $obj->fk_incoterms;
$this->location_incoterms = $obj->location_incoterms;
$this->libelle_incoterms = $obj->libelle_incoterms;
$this->module_source = $obj->module_source;
$this->pos_source = $obj->pos_source;
// Multicurrency
$this->fk_multicurrency = $obj->fk_multicurrency;
@ -2653,7 +2656,7 @@ class Facture extends CommonInvoice
* @return int <0 if KO, Id of line if OK
*/
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = 0, $fk_remise_except = '', $price_base_type = 'HT', $pu_ttc = 0, $type = self::TYPE_STANDARD, $rang = -1, $special_code = 0, $origin = '', $origin_id = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $situation_percent = 100, $fk_prev_id = 0, $fk_unit = null, $pu_ht_devise = 0)
{
{
// Deprecation warning
if ($label) {
dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING);