Explorar el Código

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

feature/souke
Guillaume Bourgeois hace 1 año
padre
commit
a0af23b8ec
Se han modificado 2 ficheros con 9 adiciones y 4 borrados
  1. +5
    -2
      backend/controllers/DistributionController.php
  2. +4
    -2
      backend/controllers/OrderController.php

+ 5
- 2
backend/controllers/DistributionController.php Ver fichero

@@ -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 Ver fichero

@@ -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 {

Cargando…
Cancelar
Guardar