Zaktualizowano wersję na 0.226, dodano opcję faktury do zamówienia oraz wprowadzono zmiany w strukturze bazy danych i logice obsługi zamówień.

This commit is contained in:
2025-01-04 12:11:50 +01:00
parent 8d5e89c6b2
commit 2bddfa31f7
27 changed files with 3422 additions and 3932 deletions

View File

@@ -540,7 +540,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
$postData = [
'idExternal' => $order['id'],
'isInvoice' => false,
'isInvoice' => $order['firm_name'] ? true : false,
'customerLogin' => $order['client_email'],
'paymentType' => (int)\front\factory\ShopPaymentMethod::get_apilo_payment_method_id( $order['payment_method_id'] ),
'originalCurrency' => 'PLN',
@@ -572,6 +572,15 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
'platformId' => $apilo_settings['platform-id']
];
if ( $order['firm_name'] )
{
$postData['addressInvoice']['name'] = $order['firm_name'];
$postData['addressInvoice']['streetName'] = $order['firm_street'];
$postData['addressInvoice']['city'] = $order['firm_city'];
$postData['addressInvoice']['zipCode'] = $order['firm_postal_code'];
$postData['addressInvoice']['companyTaxNumber'] = $order['firm_nip'];
}
// jeżeli paczkomat
if ( $order['inpost_paczkomat'] )
{