update payments and vat mentions

This commit is contained in:
ludo
2023-12-21 23:04:42 +01:00
parent 643c26d549
commit 8a463e7b9e
13 changed files with 86 additions and 143 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Repositories\Shop;
use App\Models\Shop\Order;
use App\Repositories\Core\DateStats;
use App\Traits\Model\Basic;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
class Orders
@@ -41,7 +42,7 @@ class Orders
$data += self::getSummaryOfBasket($basket);
$order = self::store($data);
$detail = $order ? OrderDetails::saveBasket($order->id, $basket['detail']) : false;
unset($data['comment'], $data['agree'], $data['delivery_address_id'], $data['sale_channel_id']);
$data = Arr::except($data, ['comment', 'agree', 'delivery_address_id', 'sale_channel_id', 'delivery_id', 'delivery_type_id']);
$invoice = $detail ? Invoices::saveInvoice($order->id, $data + $invoice) : false;
return $invoice ? $order : false;