fix correction bugs null

This commit is contained in:
Tolotsoa 2025-09-03 10:10:25 +03:00
parent 7685461442
commit d9a63e9ac3
2 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,7 @@ class DevisDataProcessor
{
$htPrice = $produit->prix_unitaire;
if ($devis['group_name'] != null) {
if ($devis['group_name'] != null && isset($produit->id)) {
$price = $this->gestionBdd->getProductPriceByClientGroupId($filter, $produit->id);
if ($price != null) {
$htPrice = $price;

View File

@ -116,8 +116,8 @@ class DevisPdfTableRenderer
[26, 18, $devis['calendar_uuid']],
[46, 23, $devis['num_commande']],
[71, 18, mb_convert_encoding($formatterDate->format($dateSoin), 'ISO-8859-1', 'UTF-8')],
[91, 33, \OCA\Gestion\Helpers\FileExportHelpers::FormatTextForExport($devis['lieu_nom'])],
[126, 28, \OCA\Gestion\Helpers\FileExportHelpers::FormatTextForExport($devis['defunt_nom'])],
[91, 33, \OCA\Gestion\Helpers\FileExportHelpers::FormatTextForExport($devis['lieu_nom'] ?? '')], // ← CORRECTION
[126, 28, \OCA\Gestion\Helpers\FileExportHelpers::FormatTextForExport($devis['defunt_nom'] ?? '')], // ← CORRECTION
[156, 18, number_format($devis['montant_htc'], 2, '.', '') . chr(128), 'C'],
[176, 13, number_format($devis['montant_tva'], 2, '.', '') . chr(128), 'C'],
[191, 13, number_format($devis['montant_ttc'], 2, '.', '') . chr(128), 'C']
@ -129,8 +129,8 @@ class DevisPdfTableRenderer
[36, 33, $devis['calendar_uuid']],
[71, 33, $devis['num_commande']],
[106, 18, mb_convert_encoding($formatterDate->format($dateSoin), 'ISO-8859-1', 'UTF-8')],
[126, 28, \OCA\Gestion\Helpers\FileExportHelpers::FormatTextForExport($devis['lieu_nom'])],
[156, 48, \OCA\Gestion\Helpers\FileExportHelpers::FormatTextForExport($devis['defunt_nom'])]
[126, 28, \OCA\Gestion\Helpers\FileExportHelpers::FormatTextForExport($devis['lieu_nom'] ?? '')], // ← CORRECTION
[156, 48, \OCA\Gestion\Helpers\FileExportHelpers::FormatTextForExport($devis['defunt_nom'] ?? '')] // ← CORRECTION
];
}