few chasnges

This commit is contained in:
2025-08-05 13:52:35 +00:00
parent e37b4dd963
commit 6c4eed7fc7
9 changed files with 58 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
<?php
// https://crm.twinpol.com/?module=EcmInvoiceOuts&action=ecommerce&b2b=true
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
ini_set('display_errors', 1);
@@ -8,7 +9,7 @@ DELETE FROM ecommerce_invoices_products WHERE invoice_id IN (
DELETE FROM ecommerce_invoices WHERE origin='amazon b2b' AND register_date LIKE '2025-04-%';
*/
$filename = getcwd() . '/modules/EcmInvoiceOuts/BimIT-eCommerceInvoices/amazonWDT/files/05-2025.csv';
$filename = getcwd() . '/modules/EcmInvoiceOuts/BimIT-eCommerceInvoices/amazonWDT/files/06-2025.csv';
$handle = fopen($filename, 'r');
if ($handle === false) {
die('Cannot open file: ' . $filename);

View File

@@ -1,6 +1,7 @@
<?php
// https://crm.twinpol.com/?module=EcmInvoiceOuts&action=ecommerce&amazon-wz=true
$filename = getcwd() . '/modules/EcmInvoiceOuts/BimIT-eCommerceInvoices/amazonWDT/files/amazon-wz-05-2025.csv';
$filename = getcwd() . '/modules/EcmInvoiceOuts/BimIT-eCommerceInvoices/amazonWDT/files/amazon-wz-06-2025.csv';
$handle = fopen($filename, 'r');
if ($handle === false) {
die('Cannot open file: ' . $filename);

View File

@@ -1,4 +1,5 @@
<?php
// https://crm.twinpol.com/?module=EcmInvoiceOuts&action=ecommerce&local-vat=true
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
ini_set('display_errors', 1);
@@ -8,7 +9,7 @@ DELETE FROM ecommerce_invoices_products WHERE invoice_id IN (
DELETE FROM ecommerce_invoices WHERE origin='amazon vat local' AND register_date LIKE '2025-02-%';
*/
$filename = getcwd() . '/modules/EcmInvoiceOuts/BimIT-eCommerceInvoices/amazonWDT/files/05-2025.csv';
$filename = getcwd() . '/modules/EcmInvoiceOuts/BimIT-eCommerceInvoices/amazonWDT/files/06-2025.csv';
$handle = fopen($filename, 'r');
if ($handle === false) {
die('Cannot open file: ' . $filename);

View File

@@ -1,4 +1,6 @@
<?php
// https://crm.twinpol.com/?module=EcmInvoiceOuts&action=ecommerce&wdt=true
$invoices = getInvoices('2024');
$products = array();

View File

@@ -1,10 +1,10 @@
<?php
// show all php errors
// https://crm.twinpol.com/?module=EcmInvoiceOuts&action=ecommerce&wdt=true
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
ini_set('display_errors', 1);
// read csv file tab separated
$filename = getcwd() . '/modules/EcmInvoiceOuts/BimIT-eCommerceInvoices/amazonWDT/files/05-2025.csv';
$filename = getcwd() . '/modules/EcmInvoiceOuts/BimIT-eCommerceInvoices/amazonWDT/files/06-2025.csv';
$handle = fopen($filename, 'r');
if ($handle === false) {
die('Cannot open file: ' . $filename);
@@ -33,10 +33,10 @@ fclose($handle);
//}
//createInvoice('DE', $de);
if (count($cz) == 0) {
die('No data for CZ');
}
createInvoice('CZ', $cz, true);
//if (count($cz) == 0) {
// die('No data for CZ');
//}
//createInvoice('CZ', $cz);
function createInvoice($type, $products, $DO_REAL_SAVE = false)
{
@@ -57,7 +57,7 @@ function createInvoice($type, $products, $DO_REAL_SAVE = false)
$invoice->parent_address_city = 'Obrowo';
$invoice->type = 'normal';
$date = '31.05.2025';
$date = '30.06.2025';
$invoice->register_date = $date;
$invoice->sell_date = $date;
$invoice->validtill_date = $date;