From ab83e22a127c5986b1829035429d2f59b47b7d75 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 18 Sep 2014 09:57:13 +0200 Subject: [PATCH] Fix: Invoices payments may be older than invoices --- ChangeLog | 1 + htdocs/compta/paiement.php | 4 ++-- htdocs/fourn/facture/paiement.php | 4 ++-- htdocs/langs/en_US/errors.lang | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4b334c542a..b4331635592 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ For users: - Fix: Must unaccent strings into SEPA file. - Fix: Extrafield feature select from table should try to translate multiple column when not needed - Fix: cents for indian ruppes are calle paisa and paise. +- Fix: Invoices payments may be older than invoices. ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 008721ef018..3aafa1c165b 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -108,8 +108,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye if ($datepaye && ($datepaye < $tmpinvoice->date)) { $langs->load("errors"); - $error++; - setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors'); + //$error++; + setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings'); } } diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 7b443bf15c0..bb84e279ba9 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -105,8 +105,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye if ($datepaye && ($datepaye < $tmpinvoice->date)) { $langs->load("errors"); - $error++; - setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors'); + //$error++; + setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings'); } } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index b874ef58f07..bbaa010bfbb 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -133,7 +133,6 @@ ErrorPHPNeedModule=Error, your PHP must have module %s installed to use t ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s ErrorWarehouseMustDiffers=Source and target warehouses must differs ErrorBadFormat=Bad format! -ErrorPaymentDateLowerThanInvoiceDate=Payment date (%s) cant' be before invoice date (%s) for invoice %s. ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any thirdparty. Link member to an existing third party or create a new thirdparty before creating subscription with invoice. ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused. @@ -153,4 +152,5 @@ WarningCloseAlways=Warning, closing is done even if amount differs between sourc WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). WarningNotRelevant=Irrelevant operation for this dataset -WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers. \ No newline at end of file +WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers. +WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s. \ No newline at end of file