Add llx_entity for better management entities
This commit is contained in:
parent
8cd085974a
commit
bee0889939
@ -154,3 +154,18 @@ ALTER TABLE llx_projet MODIFY fk_statut smallint DEFAULT 0 NOT NULL;
|
||||
ALTER TABLE llx_facturedet CHANGE tva_taux tva_tx real;
|
||||
ALTER TABLE llx_facture_fourn_det CHANGE tva_taux tva_tx double(6,3);
|
||||
ALTER TABLE llx_facturedet_rec CHANGE tva_taux tva_tx real DEFAULT 19.6;
|
||||
|
||||
-- Create table for entities
|
||||
create table llx_entity
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
label varchar(255) NOT NULL,
|
||||
description text,
|
||||
datec datetime,
|
||||
fk_user_creat integer,
|
||||
visible tinyint DEFAULT 1 NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
) type=innodb;
|
||||
|
||||
INSERT INTO llx_entity (label, description, datec, fk_user_creat, visible, active) VALUES ('Default Entity', 'This is the default entity', NOW(), 1, 1, 1);
|
||||
@ -1103,7 +1103,7 @@ function migrate_price_facture($db,$langs,$conf)
|
||||
print '<b>'.$langs->trans('MigrationInvoice')."</b><br>\n";
|
||||
|
||||
// Liste des lignes facture non a jour
|
||||
$sql = "SELECT fd.rowid, fd.qty, fd.subprice, fd.remise_percent, fd.tva_taux, fd.total_ttc, fd.info_bits,";
|
||||
$sql = "SELECT fd.rowid, fd.qty, fd.subprice, fd.remise_percent, fd.tva_tx as tva_taux, fd.total_ttc, fd.info_bits,";
|
||||
$sql.= " f.rowid as facid, f.remise_percent as remise_percent_global, f.total_ttc as total_ttc_f";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facturedet as fd, ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE fd.fk_facture = f.rowid";
|
||||
@ -1446,7 +1446,7 @@ function migrate_price_commande($db,$langs,$conf)
|
||||
$info_bits = $obj->info_bits;
|
||||
|
||||
// On met a jour les 3 nouveaux champs
|
||||
$commandeligne= new CommandeLigne($db);
|
||||
$commandeligne= new OrderLine($db);
|
||||
$commandeligne->fetch($rowid);
|
||||
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,$remise_percent_global,'HT',$info_bits);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user