Add field on coupon / test on scheudler
This commit is contained in:
parent
e54f254678
commit
3040d3a368
6 changed files with 52 additions and 4 deletions
|
|
@ -89,7 +89,7 @@ class Kernel extends ConsoleKernel
|
|||
Mail::to($users)->send(new AlertBr($couponSeuil, $couponDiffusion, $couponValidity));
|
||||
}
|
||||
}
|
||||
})->weekdays()->at('7:00');
|
||||
})->everyMinute();
|
||||
|
||||
// ---- Sauvegarde des stats tous les jours a 23:45
|
||||
$schedule->call(function () {
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ class Coupon extends Model
|
|||
'coupon_validity_text',
|
||||
'coupon_site_contact',
|
||||
'coupon_legal_mentions',
|
||||
'coupon_seuil_alert'
|
||||
'coupon_seuil_alert',
|
||||
'coupon_treatment_center'
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,9 +248,12 @@ trait GenerateBR {
|
|||
// ---- Création code barre
|
||||
if($coupon->coupon_norme == 1 && strlen($contact->contact_cp)==4){
|
||||
$textReduc = "Traitement ScanCoupon/HighCo Data Benelux";
|
||||
}else{
|
||||
}elseif($coupon->coupon_treatment_center == 0){
|
||||
$textReduc = "• Traitement ScanCoupon •";
|
||||
}
|
||||
} else {
|
||||
$textReduc = "• Traitement Sogec •";
|
||||
}
|
||||
|
||||
$ImageFond = imagecreate(270, 20);
|
||||
$white = imagecolorallocate($ImageFond, 255, 255, 255);
|
||||
$black = imagecolorallocate($ImageFond, 0, 0, 0);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddTreatmentcenterToCoupons extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('coupon', function (Blueprint $table) {
|
||||
$table->integer('coupon_treatment_center')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('coupon', function (Blueprint $table) {
|
||||
$table->dropColumn('coupon_treatment_center');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -122,6 +122,12 @@
|
|||
<?php
|
||||
$mentions = "Sur remise de ce bon en caisse, votre magasin vous fera bénéficier de la remise\r\ncorrespondante. Aucune monnaie ne sera rendue en caisse. Toute photocopie ou utilisation\r\nde ce bon pour tout autre achat qu'un des produits mentionnés ci-dessous donnera lieu à des\r\npoursuites. Valable en France métropolitaine seulement (Corse comprise) dans la période de\r\nvalidité. Offre non cumulable avec un autre bon de réduction ou offre promotionnelle. Ne peut\r\nêtre vendu.";
|
||||
?>
|
||||
<div class="form-split">
|
||||
<div class="form-field">
|
||||
{!! Form::label('coupon_treatment_center', 'Type') !!}
|
||||
{!! Form::select('coupon_treatment_center', ['HighCo', 'Sogec']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-split">
|
||||
<div class="form-field-textarea">
|
||||
{!! Form::label('coupon_validity_text', 'Texte de validité') !!}
|
||||
|
|
|
|||
|
|
@ -168,6 +168,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<h4>Informations pour génération</h4>
|
||||
<div class="form-split">
|
||||
<div class="form-field">
|
||||
{!! Form::label('coupon_treatment_center', 'Type') !!}
|
||||
{!! Form::select('coupon_treatment_center', ['HighCo', 'Sogec']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-split">
|
||||
<div class="form-field-textarea">
|
||||
{!! Form::label('coupon_validity_text', 'Texte de validité') !!}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue