diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index d3252b01a18..2c574f91f8b 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -631,7 +631,7 @@ if ($action == 'create') { print "\n"; } - if ($total_debit != $total_credit) + if (price2num($total_debit) != price2num($total_credit)) { setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings'); } diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 1f55698d13f..308c98f0cab 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -99,7 +99,7 @@ if ($action == 'add') $object->owner_address = trim($_POST["owner_address"]); $account_number = GETPOST('account_number','alpha'); - if ($account_number <= 0) { $object->account_number = ''; } else { $object->account_number = $account_number; } + if (empty($account_number) || $account_number == '-1') { $object->account_number = ''; } else { $object->account_number = $account_number; } $fk_accountancy_journal = GETPOST('fk_accountancy_journal','int'); if ($fk_accountancy_journal <= 0) { $object->fk_accountancy_journal = ''; } else { $object->fk_accountancy_journal = $fk_accountancy_journal; } @@ -656,7 +656,7 @@ else print ''; if (! empty($conf->accounting->enabled)) { $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch('',$object->account_number); + $accountingaccount->fetch('',$object->account_number, 1); print $accountingaccount->getNomUrl(0,1,1,'',1); } else { diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index a613581f5aa..f438a5ab6b9 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1075,6 +1075,7 @@ if (empty($reshook)) $TTotalByTva = array(); foreach ($srcobject->lines as &$line) { + if(! empty($line->special_code)) continue; $TTotalByTva[$line->tva_tx] += $line->total_ttc ; } diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 80c6e6680b2..abc4688ef5c 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -667,13 +667,13 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetFont('','B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; - $pdf->MultiCell(80, 4, $titre, 0, 'L'); + $pdf->MultiCell(43, 4, $titre, 0, 'L'); $pdf->SetFont('','', $default_font_size - 2); $pdf->SetXY($posxval, $posy); $lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc); $lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement); - $pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L'); + $pdf->MultiCell(67, 4, $lib_condition_paiement,0,'L'); $posy=$pdf->GetY()+3; } diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 98b2367db32..bfecd773b27 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -892,13 +892,13 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetFont('','B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; - $pdf->MultiCell(80, 4, $titre, 0, 'L'); + $pdf->MultiCell(43, 4, $titre, 0, 'L'); $pdf->SetFont('','', $default_font_size - 2); $pdf->SetXY($posxval, $posy); $lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc); $lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement); - $pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L'); + $pdf->MultiCell(67, 4, $lib_condition_paiement,0,'L'); $posy=$pdf->GetY()+3; } diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 9105a82b0d4..41e76ddbf3d 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -854,13 +854,13 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('','B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; - $pdf->MultiCell(80, 4, $titre, 0, 'L'); + $pdf->MultiCell(43, 4, $titre, 0, 'L'); $pdf->SetFont('','', $default_font_size - 2); $pdf->SetXY($posxval, $posy); $lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc); $lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement); - $pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L'); + $pdf->MultiCell(67, 4, $lib_condition_paiement,0,'L'); $posy=$pdf->GetY()+3; }