管理画面:受注情報編集において、「変更」ボタンをクリックし、商品を選択する。
(1)変更前と同じ商品を選ぶ
現状:数量が+1される。
本来は、数量が変化してはいけないと思う。
これについては、既にチケット#2486に登録されています。
修正案
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
//既にあるデータは1つだけ数量を1増やす
$pre_shipment_product_class_id = $arrShipmentProducts['shipment_product_class_id'][$select_shipping_id][$change_no];
if ($pre_shipment_product_class_id == $edit_product_class_id) {
/* deleted
$arrShipmentProducts['shipment_quantity'][$select_shipping_id][$change_no] ++;
deleted */
} elseif (in_array($edit_product_class_id, $arrShipmentProducts['shipment_product_class_id'][$select_shipping_id])) {
(2)既にある商品と同じ商品を選ぶ
現状:数量が+1される。
本来は、「変更前の商品の数量+既にある商品の数量」になるのではないかと思う。
この(2)についてのスレッドです。
修正案
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
} elseif (in_array($edit_product_class_id, $arrShipmentProducts['shipment_product_class_id'][$select_shipping_id])) {
// added
$pre_shipment_quantity = $arrShipmentProducts['shipment_quantity'][$select_shipping_id][$change_no];
// added
//配送先データ削除
$arrShipmentProducts = $this->deleteShipment($objFormParam, $this->arrShipmentItemKeys , $select_shipping_id, $change_no);
foreach ($arrShipmentProducts['shipment_product_class_id'][$select_shipping_id] as $relation_index => $shipment_product_class_id) {
if ($shipment_product_class_id == $edit_product_class_id) {
/* changed
$arrShipmentProducts['shipment_quantity'][$select_shipping_id][$relation_index] ++;
changed */
$arrShipmentProducts['shipment_quantity'][$select_shipping_id][$relation_index]
= $arrShipmentProducts['shipment_quantity'][$select_shipping_id][$relation_index] + $pre_shipment_quantity;
// changed
break;
}
}
追記:6/24
(3)新しい商品を選ぶ
現状:数量が1にされる。
本来は、「変更前の商品の数量」になるのではないかと思う。
修正案
data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
public function changeShipmentProducts(&$arrShipmentProducts, $arrProductInfo, $shipping_id, $no)
{
$arrShipmentProducts['shipment_product_class_id'][$shipping_id][$no] = $arrProductInfo['product_class_id'];
$arrShipmentProducts['shipment_product_code'][$shipping_id][$no] = $arrProductInfo['product_code'];
$arrShipmentProducts['shipment_product_name'][$shipping_id][$no] = $arrProductInfo['name'];
$arrShipmentProducts['shipment_classcategory_name1'][$shipping_id][$no] = $arrProductInfo['classcategory_name1'];
$arrShipmentProducts['shipment_classcategory_name2'][$shipping_id][$no] = $arrProductInfo['classcategory_name2'];
$arrShipmentProducts['shipment_price'][$shipping_id][$no] = $arrProductInfo['price02'];
/* deleted
$arrShipmentProducts['shipment_quantity'][$shipping_id][$no] = 1;
deleted */
}