Merge branch 'trunk'
This commit is contained in:
commit
e5e6d2bee8
2 changed files with 9 additions and 29 deletions
|
|
@ -134,11 +134,7 @@ class AjaxController extends Controller
|
|||
$mur->save();
|
||||
|
||||
// Sauvegarde de stat
|
||||
$stat = new Statistique();
|
||||
$stat->stat_campId = $campagne->camp_id;
|
||||
$stat->stat_couponId = $cp->coupon_id;
|
||||
$stat->stat_couponPrinted = 1;
|
||||
$stat->save();
|
||||
$this->saveStat($campagne, $cp);
|
||||
}//end if
|
||||
}//end foreach
|
||||
} elseif ($campagne->camp_type->equals(CampaignTypes::panier())) {
|
||||
|
|
@ -171,11 +167,7 @@ class AjaxController extends Controller
|
|||
array_push($couponsPrinted, ['cp_code' => $cp->coupon_code, 'qty' => $panierContent->panier_content_quantity]);
|
||||
|
||||
// Sauvegarde de stat
|
||||
$stat = new Statistique();
|
||||
$stat->stat_campId = $campagne->camp_id;
|
||||
$stat->stat_couponId = $cp->coupon_id;
|
||||
$stat->stat_couponPrinted = $panierContent->panier_content_quantity;
|
||||
$stat->save();
|
||||
$this->saveStat($campagne, $cp);
|
||||
} else {
|
||||
if ($panierContent->panier_content_quantity > 0) {
|
||||
$coupons .= '<img src="' . $imgCoupon . '" border="0" style="display:block;width:165mm;"/>';
|
||||
|
|
@ -188,11 +180,7 @@ class AjaxController extends Controller
|
|||
array_push($couponsPrinted, ['cp_code' => $cp->coupon_code, 'qty' => 1]);
|
||||
|
||||
// Sauvegarde de stat
|
||||
$stat = new Statistique();
|
||||
$stat->stat_campId = $campagne->camp_id;
|
||||
$stat->stat_couponId = $cp->coupon_id;
|
||||
$stat->stat_couponPrinted = 1;
|
||||
$stat->save();
|
||||
$this->saveStat($campagne, $cp);
|
||||
}
|
||||
}//end if
|
||||
// ---- Mémorise l'impression
|
||||
|
|
@ -233,11 +221,7 @@ class AjaxController extends Controller
|
|||
$mur->save();
|
||||
|
||||
// Sauvegarde de stat
|
||||
$stat = new Statistique();
|
||||
$stat->stat_campId = $campagne->camp_id;
|
||||
$stat->stat_couponId = $cp->coupon_id;
|
||||
$stat->stat_couponPrinted = 1;
|
||||
$stat->save();
|
||||
$this->saveStat($campagne, $cp);
|
||||
}//end if
|
||||
}//end foreach
|
||||
} elseif ($campagne->camp_type->equals(CampaignTypes::paniers())) {
|
||||
|
|
@ -265,11 +249,7 @@ class AjaxController extends Controller
|
|||
$newQtyPrinted = $panierContent->panier_content_printed + 1;
|
||||
|
||||
// Sauvegarde de stat
|
||||
$stat = new Statistique();
|
||||
$stat->stat_campId = $campagne->camp_id;
|
||||
$stat->stat_couponId = $cp->coupon_id;
|
||||
$stat->stat_couponPrinted = 1;
|
||||
$stat->save();
|
||||
$this->saveStat($campagne, $cp);
|
||||
}
|
||||
array_push($couponsPrinted, ['cp_code' => $cp->coupon_code, 'qty' => 1]);
|
||||
// ---- Mémorise l'impression
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ trait GenerateBR
|
|||
$arial = public_path() . '/build/assets/fonts/coupons/arial.ttf';
|
||||
$arialbd = public_path() . '/build/assets/fonts/coupons/arialbd.ttf';
|
||||
$impact = public_path() . '/build/assets/fonts/coupons/impact.ttf';
|
||||
$hand_picture = 'build/assets/images/coupons/hand.png';
|
||||
$mask_img = 'build/assets/images/coupons/mask.png';
|
||||
$hand_picture = public_path() . '/build/assets/images/coupons/hand.png';
|
||||
$mask_img = public_path() . '/build/assets/images/coupons/mask.png';
|
||||
|
||||
if (!is_null($request->site_id)) {
|
||||
$site = Site::where(['id' => $request->site_id])->first();
|
||||
|
|
@ -27,9 +27,9 @@ trait GenerateBR
|
|||
$site = $coupon->site()->first();
|
||||
}
|
||||
|
||||
$logo_display = $coupon->coupon_logo_image;
|
||||
$logo_display = public_path() . '/' . $coupon->coupon_logo_image;
|
||||
|
||||
$product_image = $coupon->coupon_decoration_image;
|
||||
$product_image = public_path() . '/' . $coupon->coupon_decoration_image;
|
||||
// ---- Masque dans lequel l'image finale sera placée
|
||||
$mask = imagecreatefrompng($mask_img);
|
||||
list($maskWidth, $maskHeight) = getimagesize($mask_img);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue