Pārlūkot izejas kodu

Merge branch 'dev'

prodstable
Guillaume pirms 2 gadiem
vecāks
revīzija
535bfe0da9
8 mainītis faili ar 1902 papildinājumiem un 1791 dzēšanām
  1. +1396
    -1320
      backend/controllers/DistributionController.php
  2. +470
    -464
      backend/controllers/DocumentController.php
  3. +1
    -1
      backend/views/point-sale/index.php
  4. +2
    -1
      backend/web/js/vuejs/distribution-index.js
  5. +1
    -1
      common/helpers/Tiller.php
  6. +4
    -3
      common/models/Order.php
  7. +26
    -0
      console/migrations/m220802_092239_add_field_order_tiller_external_id.php
  8. +2
    -1
      producer/web/js/vuejs/order-order.js

+ 1396
- 1320
backend/controllers/DistributionController.php
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 470
- 464
backend/controllers/DocumentController.php
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 1
- 1
backend/views/point-sale/index.php Parādīt failu

@@ -128,7 +128,7 @@ $this->addButton(
'label' => 'Crédit',
'format' => 'raw',
'value' => function ($model) {
if ($model->credit) {
if ($model->credit && isset(Producer::$creditFunctioningArray[$model->credit_functioning])) {
return '<span class="glyphicon glyphicon-euro"></span> ' . Producer::$creditFunctioningArray[$model->credit_functioning];
}


+ 2
- 1
backend/web/js/vuejs/distribution-index.js Parādīt failu

@@ -728,8 +728,9 @@ Vue.component('order-form',{
}
if(parseFloat(this.order.productOrder[id_product].quantity) + quantity >= 0) {
var theQuantity = parseFloat(this.order.productOrder[id_product].quantity) + parseFloat(quantity) ;

Vue.set(this.order.productOrder, id_product, {
quantity: theQuantity,
quantity: theQuantity.toFixed(2),
unit: this.order.productOrder[id_product].unit,
price: this.order.productOrder[id_product].price,
active: this.order.productOrder[id_product].active

+ 1
- 1
common/helpers/Tiller.php Parādīt failu

@@ -90,7 +90,7 @@ class Tiller
$ordersOpendistribSynchro[$orderOpendistrib->id] = false;
if(isset($ordersTiller->orders)) {
foreach ($ordersTiller->orders as $orderTiller) {
if ($orderOpendistrib->id == $orderTiller->externalId
if ($orderOpendistrib->tiller_external_id == $orderTiller->externalId
&& (int) round($orderOpendistrib->getAmountWithTax(Order::AMOUNT_TOTAL) * 100) == (int) $orderTiller->currentBill) {

$ordersOpendistribSynchro[$orderOpendistrib->id] = true;

+ 4
- 3
common/models/Order.php Parādīt failu

@@ -114,8 +114,8 @@ class Order extends ActiveRecordCommon
'integer'
],
[['auto_payment', 'tiller_synchronization', 'delivery_home'], 'boolean'],
[['status', 'reference', 'delivery_address', 'online_payment_url'], 'string'],
[['date', 'date_update', 'comment', 'comment_point_sale', 'mean_payment'], 'safe']
[['status', 'reference', 'delivery_address', 'online_payment_url', 'tiller_external_id'], 'string'],
[['date', 'date_update', 'comment', 'comment_point_sale', 'mean_payment', 'tiller_external_id'], 'safe']
];
}

@@ -139,7 +139,8 @@ class Order extends ActiveRecordCommon
'reference' => 'Référence',
'delivery_home' => 'Livraison à domicile',
'delivery_address' => 'Adresse de livraison',
'online_payment_url' => 'URL de paiement'
'online_payment_url' => 'URL de paiement',
'tiller_external_id' => 'Tiller : externalId',
];
}


+ 26
- 0
console/migrations/m220802_092239_add_field_order_tiller_external_id.php Parādīt failu

@@ -0,0 +1,26 @@
<?php

use yii\db\Migration;
use yii\db\Schema;

/**
* Class m220802_092239_add_field_order_tiller_external_id
*/
class m220802_092239_add_field_order_tiller_external_id extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('order', 'tiller_external_id', Schema::TYPE_STRING.' DEFAULT NULL');
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('order', 'tiller_external_id');
}
}

+ 2
- 1
producer/web/js/vuejs/order-order.js Parādīt failu

@@ -429,7 +429,8 @@ var app = new Vue({
(this.products[product.index].quantity_form + quantity <= (this.products[product.index].quantity_remaining * this.products[product.index].coefficient_unit) ||
!this.products[product.index].quantity_max)
) {
this.products[product.index].quantity_form += quantity ;
var theQuantity = parseFloat(this.products[product.index].quantity_form) + parseFloat(quantity);
this.products[product.index].quantity_form = parseFloat(theQuantity.toFixed(2)) ;
}
},
oneProductOrdered: function() {

Notiek ielāde…
Atcelt
Saglabāt