瀏覽代碼

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

feature/souke
Guillaume Bourgeois 1 年之前
父節點
當前提交
a0af23b8ec
共有 2 個檔案被更改,包括 9 行新增4 行删除
  1. +5
    -2
      backend/controllers/DistributionController.php
  2. +4
    -2
      backend/controllers/OrderController.php

+ 5
- 2
backend/controllers/DistributionController.php 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存