Skip to content

Commit

Permalink
Fix: Can not create replacement invoice if source invoice has a disco…
Browse files Browse the repository at this point in the history
…unt.
  • Loading branch information
eldy committed Mar 1, 2011
1 parent 500d60f commit 0d47653
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions htdocs/install/mysql/migration/2.9.0-3.0.0.sql
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion htdocs/install/mysql/tables/llx_facturedet.key.sql
Expand Up @@ -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);

0 comments on commit 0d47653

Please sign in to comment.