Dbut ajout gestion du coefficient de marge
This commit is contained in:
parent
f9682b6ab8
commit
fb405d701d
@ -687,7 +687,7 @@ class Commande
|
||||
$this->brouillon = 1;
|
||||
// exp pdf -----------
|
||||
$this->lignes = array();
|
||||
$sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice,';
|
||||
$sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice, l.coef,';
|
||||
$sql.= ' p.label, p.description as product_desc, p.ref, p.fk_product_type, p.rowid as prodid';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product=p.rowid';
|
||||
@ -712,6 +712,7 @@ class Commande
|
||||
$ligne->remise_percent = $objp->remise_percent;
|
||||
$ligne->price = $objp->price;
|
||||
$ligne->product_id = $objp->fk_product;
|
||||
$ligne->coef = $objp->coef;
|
||||
|
||||
$ligne->libelle = $objp->label; // Label produit
|
||||
$ligne->product_desc = $objp->product_desc; // Description produit
|
||||
|
||||
@ -183,3 +183,5 @@ ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_user_author FORE
|
||||
ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||
|
||||
ALTER TABLE llx_facture_rec ADD UNIQUE INDEX idx_facture_rec_uk_titre (titre);
|
||||
|
||||
alter table llx_commandedet add column coef real;
|
||||
|
||||
@ -31,5 +31,6 @@ create table llx_commandedet
|
||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
||||
remise real DEFAULT 0, -- montant de la remise
|
||||
subprice real, -- prix avant remise
|
||||
price real -- prix final
|
||||
price real, -- prix final
|
||||
coef real -- coefficient de marge
|
||||
)type=innodb;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user