Merge pull request #38685 from aspangaro/24_matchingproblem

Matching - Remove harcoded error
This commit is contained in:
Alexandre SPANGARO 2026-06-11 07:48:49 +02:00 committed by GitHub
commit 410a07f628
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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. Total debit: %s | Total credit: %s
Codejournal=Journal
JournalLabel=Journal label
NumPiece=Piece number