Merge branch 'trunk'

This commit is contained in:
K Muller 2026-10-08 14:25:16 +02:00
commit a737011ae3
2 changed files with 6 additions and 5 deletions

View file

@ -250,12 +250,13 @@ class AjaxController extends Controller
// Sauvegarde de stat
$this->saveStat($campagne, $cp);
// ---- Mémorise l'impression
$panierContent->panier_content_quantity = $newQtyAvailable;
$panierContent->panier_content_printed = $newQtyPrinted;
$panierContent->save();
}
array_push($couponsPrinted, ['cp_code' => $cp->coupon_code, 'qty' => 1]);
// ---- Mémorise l'impression
$panierContent->panier_content_quantity = $newQtyAvailable;
$panierContent->panier_content_printed = $newQtyPrinted;
$panierContent->save();
}//end if
}//end foreach
// ---- Update du status du panier

View file

@ -103,7 +103,7 @@ trait CouponTrait
{
$panierContents = $panier->panierContents()->get();
foreach ($panierContents as $key => $panierContent) {
$coupon = Coupon::where(['coupon_id' => $panierContent->panier_content_couponId])->first();
$coupon = Coupon::where(['coupon_id' => $panierContent->panier_content_couponId])->firstOrFail();
// ---- Contrôle de la publication
if ($coupon->coupon_published == 0) {
$panierContents->forget($key);