Merge branch 'trunk'
This commit is contained in:
commit
a737011ae3
2 changed files with 6 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue