$format = 'Y-m-d' ; | $format = 'Y-m-d' ; | ||||
$dateObject = DateTime::createFromFormat($format, $date); | $dateObject = DateTime::createFromFormat($format, $date); | ||||
$producer = Producer::getCurrent() ; | |||||
$json['producer'] = [ | |||||
'credit' => $producer->credit | |||||
]; | |||||
$distributionsArray = Distribution::searchAll([ | $distributionsArray = Distribution::searchAll([ | ||||
'active' => 1 | 'active' => 1 | ||||
], [ | ], [ |
<span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à payer</span> | <span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à payer</span> | ||||
</div> | </div> | ||||
</td> | </td> | ||||
<td class="column-payment"> | |||||
<td class="column-payment" v-if="producer.credit"> | |||||
<div class="btn-group" v-if="order.user && !order.date_delete"> | <div class="btn-group" v-if="order.user && !order.date_delete"> | ||||
<button class="btn btn-xs btn-default" v-if="order.amount_paid == order.amount" @click="orderPaymentClick" :data-id-order="order.id" data-type="refund" :data-amount="order.amount"> | <button class="btn btn-xs btn-default" v-if="order.amount_paid == order.amount" @click="orderPaymentClick" :data-id-order="order.id" data-type="refund" :data-amount="order.amount"> | ||||
<span class="glyphicon glyphicon-euro"></span> Rembourser | <span class="glyphicon glyphicon-euro"></span> Rembourser |
distribution: { | distribution: { | ||||
active: false, | active: false, | ||||
}, | }, | ||||
producer: null, | |||||
oneDistributionWeekActive: false, | oneDistributionWeekActive: false, | ||||
products: [], | products: [], | ||||
countActiveProducts: 0, | countActiveProducts: 0, | ||||
axios.get("ajax-infos",{params: {date : this.getDate()}}) | axios.get("ajax-infos",{params: {date : this.getDate()}}) | ||||
.then(function(response) { | .then(function(response) { | ||||
app.distribution = response.data.distribution ; | app.distribution = response.data.distribution ; | ||||
app.producer = response.data.producer ; | |||||
app.products = response.data.products ; | app.products = response.data.products ; | ||||
app.initCountActiveProducts() ; | app.initCountActiveProducts() ; | ||||