Fix: Can not create replacement invoice if source invoice has a discount.

This commit is contained in:
Laurent Destailleur 2011-03-01 10:40:55 +00:00
parent 500d60fc7e
commit 0d47653e14
2 changed files with 4 additions and 1 deletions

View File

@ -160,3 +160,6 @@ UPDATE llx_documentmodel set type='order_supplier' WHERE type='supplier_order';
UPDATE llx_c_type_contact set element='invoice_supplier' WHERE element='facture_fourn';
UPDATE llx_c_type_contact set module='invoice_supplier' WHERE module='supplier_invoice';
UPDATE llx_c_type_contact set module='order_supplier' WHERE module='supplier_order';
ALTER TABLE llx_facturedet DROP INDEX uk_fk_remise_except;
ALTER TABLE llx_facturedet ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except, fk_facture);

View File

@ -23,5 +23,5 @@
-- V4 DELETE llx_facturedet FROM llx_facturedet LEFT JOIN llx_facture ON llx_facturedet.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_facture (fk_facture);
ALTER TABLE llx_facturedet ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except);
ALTER TABLE llx_facturedet ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except, fk_facture);
ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);