Merge branch 'features/feature-add-thanato-address' into releases/release-h2f

This commit is contained in:
Tiavina 2025-02-26 12:34:10 +03:00
commit 29a84afac4
34 changed files with 69 additions and 38 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -43,7 +43,8 @@ class Bdd {
"provider_name","provider_last_name","provider_company_name","provider_siret_number","provider_phone","provider_email",
"provider_address","provider_city","fk_provider_id",
"label","fk_order_id","fk_order_item_id","quantity",
"brand","model","immatriculation","purchase_date","fk_vehicle_purchase_type_key","purchase_date");
"brand","model","immatriculation","purchase_date","fk_vehicle_purchase_type_key","purchase_date",
"thanato_address","thanato_city","thanato_phone","thanato_siret","thanato_company_name");
$this->whiteTable = array("client", "lieu", "trajet", "devis", "produit_devis", "facture", "produit",
"configuration", "ligne_trajet", "thanato", "article", "defunt", "article_devis",
"bibliotheque", "bijou_defunt", "obs_defunt", "hypo_defunt",
@ -155,6 +156,9 @@ class Bdd {
thanato.thanato_email,
thanato_type.thanato_type_label,
thanato.fk_user_uuid,
thanato.thanato_address,
thanato.thanato_city,
thanato.thanato_phone,
users.uid as user_uuid,
users.displayname as user_display_name
FROM ".$this->tableprefix."thanato as thanato

View File

@ -393,6 +393,12 @@ class OrderBdd {
thanato.id as thanato_id,
thanato.nom as thanato_nom,
thanato.prenom as thanato_prenom,
thanato.thanato_address as thanato_address,
thanato.thanato_city as thanato_city,
thanato.thanato_phone as thanato_phone,
thanato.thanato_siret as thanato_siret,
thanato.thanato_company_name as thanato_company_name,
thanato.thanato_email as thanato_email,
client.id as client_id,
client.nom as client_nom,
client.prenom as client_prenom,

View File

@ -126,11 +126,16 @@ class OrderService {
$orderProducts = [];
if($orderDetails["fk_order_type_key"] == OrderTypeConstant::ORDER_TYPE_DEVIS){
$orderProducts = $this->gestionBdd->getOrderDevisProduits($orderDetails["fk_devis_id"]);
$clientAdresses = FileExportHelpers::GetAddressAndCityFromAddress($orderDetails["client_adresse"]);
$orderDetails["client_real_adress"] = $clientAdresses["address"];
$orderDetails["client_adress_city"] = $clientAdresses["city"];
$orderDetails["client_real_adress"] = $orderDetails["thanato_address"];
$orderDetails["client_adress_city"] = $orderDetails["thanato_city"];
$orderDetails["type"] = OrderPdfConstant::SUBCONTRACTOR_TYPE;
$orderDetails["defunt_name_with_sexe"] = FileExportHelpers::GetSexeLabel($orderDetails['defunt_sexe']) . ' '. $orderDetails["defunt_nom"];
$orderDetails["defunt_name_with_sexe"] = $orderDetails["defunt_nom"];
$orderDetails["client_phone"] = $orderDetails["thanato_phone"];
$orderDetails["client_legal_one"] = $orderDetails["thanato_siret"];
$orderDetails["company_name"] = $orderDetails["thanato_company_name"];
$orderDetails["client_name"] = $orderDetails["thanato_nom"] . ' ' . $orderDetails['thanato_prenom'];
$orderDetails["client_name"] = trim($orderDetails["client_name"]);
$orderDetails["client_mail"] = $orderDetails["thanato_email"] ?? "";
}
else{
$orderItems = $this->orderBdd->getOrderItemsByOrderId($orderId);
@ -149,6 +154,9 @@ class OrderService {
$orderDetails["client_mail"] = $orderDetails["provider_email"];
$orderDetails["type"] = OrderPdfConstant::PROVIDER_TYPE;
$orderDetails["devis_date"] = $orderDetails["order_date"];
$orderDetails["company_name"] = $orderDetails["provider_company_name"];
$orderDetails["client_name"] = $orderDetails["provider_name"] . ' ' . $orderDetails['provider_last_name'];
$orderDetails["client_name"] = trim($orderDetails["client_name"]);
}
$orderDetails["products"] = $orderProducts;
return $orderDetails;

View File

@ -90,15 +90,16 @@ class OrderPdfHandler extends FPDF {
$this->SetFont('Arial', '', 12);
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->orderData['configuration']->entreprise), 0, 0);
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport(
$this->orderData['type']),
$this->orderData['company_name']),
0, 1,'R');
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->orderData['configuration_adresse']), 0, 0);
$this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->orderData['client_real_adress'])), 0, 1,'R');
$this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->orderData['client_name'])), 0, 1,'R');
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->orderData['configuration_adresse_city']), 0, 0);border:
$this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->orderData['client_adress_city'])), 0, 1,'R');
$this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->orderData['client_real_adress'])), 0, 1,'R');
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($this->orderData['configuration']->telephone),0,0);
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . $this->orderData['client_legal_one'], 0, 1,'R');
$this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->orderData['client_adress_city'])), 0, 1,'R');
$this->Cell(0, 7, 'Mail : ' . $this->orderData['configuration']->mail, 0, 0);
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . $this->orderData['client_legal_one'], 0, 1,'R');
$this->Cell(0, 7, 'Mail : ' . FileExportHelpers::FormatTextForExport($this->orderData['client_mail']), 0, 1,'R');
$this->Ln(3);
}

View File

@ -26,6 +26,10 @@ export class Thanatopracteur {
}
this.userDisplayName = userDisplayName;
this.currentUserUuid + currentUserUuid;
this.thanatoAddress = ((myresp.thanato_address != null && myresp.thanato_address.length > 0)) ? myresp.thanato_address : '-';
this.thanatoCity = ((myresp.thanato_city != null && myresp.thanato_city.length > 0)) ? myresp.thanato_city : '-';
this.thanatoSiret = ((myresp.thanato_siret != null && myresp.thanato_siret.length > 0)) ? myresp.thanato_siret : '-';
this.thanatoCompanyName = ((myresp.thanato_company_name != null && myresp.thanato_company_name.length > 0)) ? myresp.thanato_company_name : '-';
}
/**undefined
@ -41,6 +45,10 @@ export class Thanatopracteur {
'<div class="editable" data-table="thanato" data-column="thanato_email" data-id="' + this.id + '">' + this.thanatoEmail + '</div>',
'<div class="selectThanatoType" data-table="thanato" data-column="fk_thanato_type_key" data-id="' + this.id + '" data-current="' + this.thanatoTypeKey + '">' + this.thanatoTypeLabel + '</div>',
'<div class="selectUserAsThanatoList" data-table="thanato" data-column="fk_user_uuid" data-id="' + this.id + '" data-current="' + this.currentUserUuid + '">' + this.userDisplayName + '</div>',
'<div class="editable" data-table="thanato" data-column="thanato_address" data-id="' + this.id + '">' + this.thanatoAddress + '</div>',
'<div class="editable" data-table="thanato" data-column="thanato_city" data-id="' + this.id + '">' + this.thanatoCity + '</div>',
'<div class="editable" data-table="thanato" data-column="thanato_siret" data-id="' + this.id + '">' + this.thanatoSiret + '</div>',
'<div class="editable" data-table="thanato" data-column="thanato_company_name" data-id="' + this.id + '">' + this.thanatoCompanyName + '</div>',
'<center><div data-modifier="thanato" data-id=' + this.id + ' data-table="thanato" style="display:inline-block;margin-right:0px;" class="deleteItem icon-delete"></div></center>'
];
return myrow;

View File

@ -28,7 +28,11 @@
<th>Date d'habilitation</th>
<th><?php p($l->t('Email'));?></th>
<th><?php p($l->t('Type'));?></th>
<th>User</th>
<th>Utilisateur </th>
<th>Adresse </th>
<th>Ville </th>
<th> Siret </th>
<th>Société</th>
<th><?php p($l->t('Actions'));?></th>
</tr>
</thead>