Sfoglia il codice sorgente

[Administration] Distributions > Édition commande : correctif changement de prix #1259

feature/souke
Guillaume Bourgeois 1 anno fa
parent
commit
a0af23b8ec
2 ha cambiato i file con 9 aggiunte e 4 eliminazioni
  1. +5
    -2
      backend/controllers/DistributionController.php
  2. +4
    -2
      backend/controllers/OrderController.php

+ 5
- 2
backend/controllers/DistributionController.php Vedi File

@@ -209,8 +209,11 @@ class DistributionController extends BackendController

$jsonProduct['quantity_form'] = 0;

if (!$product->taxRate) {
$jsonProduct['taxRate'] = $this->getProducerCurrent()->taxRate;
if ($product->taxRate) {
$jsonProduct['taxRate'] = $product->taxRate->getAttributes();
}
else {
$jsonProduct['taxRate'] = $this->getProducerCurrent()->taxRate->getAttributes();
}

$jsonProductsArray[] = $jsonProduct;

+ 4
- 2
backend/controllers/OrderController.php Vedi File

@@ -957,8 +957,10 @@ class OrderController extends BackendController
$productOrder->quantity = $quantity;
$productOrder->price = $dataProductOrder->price;

if($dataProductOrder->invoice_price && $dataProductOrder->invoice_price != $dataProductOrder->price) {
//die('invoice price : '.$dataProductOrder->invoice_price);
if(isset($dataProductOrder->invoice_price)
&& $dataProductOrder->invoice_price
&& $dataProductOrder->invoice_price != $dataProductOrder->price) {
$productOrder->invoice_price = $dataProductOrder->invoice_price;
}
} else {

Loading…
Annulla
Salva