Matching - Remove harcoded error

This commit is contained in:
Alexandre SPANGARO 2026-06-11 05:46:17 +02:00
parent dc3e157cb2
commit d51d5f8f7b
2 changed files with 3 additions and 2 deletions

View file

@ -399,7 +399,7 @@ class Lettering extends BookKeeping
if ($resql) {
if ($obj = $this->db->fetch_object($resql)) {
if (!(round(abs($obj->deb), 2) === round(abs($obj->cred), 2))) {
$this->errors[] = 'Total not exacts ' . round(abs($obj->deb), 2) . ' vs ' . round(abs($obj->cred), 2);
$this->errors[] = $langs->trans('ErrorMatchingUnbalanced', price(price2num(abs($obj->deb),'MT')), price(price2num(abs($obj->cred),'MT')));
$error++;
}
}
@ -703,7 +703,7 @@ class Lettering extends BookKeeping
if ($resql) {
if ($obj = $this->db->fetch_object($resql)) {
if (!(round(abs($obj->deb), 2) === round(abs($obj->cred), 2))) {
$this->errors[] = 'Total not exacts ' . round(abs($obj->deb), 2) . ' vs ' . round(abs($obj->cred), 2);
$this->errors[] = $langs->trans('ErrorMatchingUnbalanced', price(price2num(abs($obj->deb),'MT')), price(price2num(abs($obj->cred),'MT')));
$error++;
}
}

View file

@ -229,6 +229,7 @@ LetteringCode=Matching code
Lettering=Matching
GeneralMatching=General account matching
AuxiliaryMatching=Auxiliary account matching
ErrorMatchingUnbalanced=Matching is impossible because it is unbalanced. Debit %s | Credit %s
Codejournal=Journal
JournalLabel=Journal label
NumPiece=Piece number