diff --git a/htdocs/core/tpl/objectline_title.tpl.php b/htdocs/core/tpl/objectline_title.tpl.php index 157e24f64b9..4d6fd5d0d75 100644 --- a/htdocs/core/tpl/objectline_title.tpl.php +++ b/htdocs/core/tpl/objectline_title.tpl.php @@ -83,7 +83,7 @@ print ''.$langs->trans('ReductionShort').'situation_cycle_ref) { print '' . $langs->trans('Progress') . ''; - print '' . $langs->trans('TotalHT100Short') . ''; + print '' . $form->textwithpicto($langs->trans('TotalHT100Short'), $langs->trans('UnitPriceXQtyLessDiscount')) . ''; } if ($usemargins && ! empty($conf->margin->enabled) && empty($user->socid)) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 24d077654da..b21429a4d1b 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -491,8 +491,13 @@ UPDATE llx_accounting_bookkeeping set date_creation = tms where date_creation IS -- UPDATE llx_facturedet_rec set label = NULL WHERE label IS NOT NULL; + UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL; +-- Test inconsistency of data into situation invoices: If it differs, it may be the total_ht that is wrong and situation_percent that is good. +-- select f.rowid, f.type, qty, subprice, situation_percent, total_ht, total_ttc, total_tva, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc, (situation_percent / 100 * subprice * qty * (1 - (fd.remise_percent / 100))) +-- from llx_facturedet as fd, llx_facture as f where fd.fk_facture = f.rowid AND (total_ht - situation_percent / 100 * subprice * qty * (1 - (fd.remise_percent / 100))) > 0.01 and f.type = 5; + -- Note to make all deposit as payed when there is already a discount generated from it. --drop table tmp_invoice_deposit_mark_as_available; @@ -501,6 +506,7 @@ UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NUL + -- Note to migrate from old counter aquarium to new one -- drop table tmp; -- create table tmp select rowid, code_client, concat(substr(code_client, 1, 6),'-0',substr(code_client, 8, 5)) as code_client2 from llx_societe where code_client like 'CU____-____'; diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 6e26ecb6835..ac521ad8102 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -574,3 +574,4 @@ AutoFillDateTo=Set end date for service line with next invoice date AutoFillDateToShort=Set end date MaxNumberOfGenerationReached=Max number of gen. reached BILL_DELETEInDolibarr=Invoice deleted +UnitPriceXQtyLessDiscount=Unit price x Qty - Discount