Cambiato idInternet con 'FDV_' aggiunto all'inizio.

This commit is contained in:
paoloar77
2024-10-03 11:53:26 +02:00
parent cdf3ed84f2
commit c3c41bd1e7
2 changed files with 10 additions and 7 deletions

View File

@@ -37,12 +37,15 @@ class OrderUpdateGm extends Command
} }
/** /**
* Execute the console command. * Handles the order update process from GM.
*
* This command fetches orders from WooCommerce with a pending, processing, or on-hold status, and checks if they exist in the GM system. If an order is found in GM, it checks the status and updates the WooCommerce order accordingly. If an order is updated, an email is sent to the admin with the details.
* *
* @return int * @return int
*/ */
public function handle() public function handle()
{ {
echo "OrderUpdateGM... ";
$productLogger = new ProductLogger(null, 'checkorders', true); $productLogger = new ProductLogger(null, 'checkorders', true);
$page = 1; $page = 1;
$orderupdated = 0; $orderupdated = 0;

View File

@@ -2229,7 +2229,7 @@ Route::post('/updatecreate', function (Request $request) {
} }
//$orderold = //$orderold =
$productLogger->addLog('', 'Creazione Ordine... codice=' . $request->id); $productLogger->addLog('', 'Creazione Ordine... codice=' . $request->id);
$order->IdInternet = $request->id; $order->IdInternet = 'FDV_' . $request->id;
$order->Enabled = 1; $order->Enabled = 1;
$order->idSito = 7; $order->idSito = 7;
$order->DataOra = $request->date_created; $order->DataOra = $request->date_created;