[WIP] Working on orders & invoices

This commit is contained in:
Ludovic CANDELLIER
2022-08-19 22:04:44 +02:00
parent c22b10dd10
commit f89acd9399
32 changed files with 440 additions and 323 deletions

View File

@@ -6,12 +6,15 @@ use App\Models\Shop\OrderDetail;
class OrderDetails
{
public static function saveBasket($order_id, $data)
{
foreach ($data as $item) {
$item['order_id'] = $order_id;
$detail = self::store($item);
$detail = self::store([
'order_id' => $order_id,
'offer_id' => $item['id'],
'quantity' => $item['quantity'],
'price_taxed' => $item['price'],
]);
}
return true;
}