Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

gogs před 7 hodinami
rodič
revize
25e5eea895
1 změnil soubory, kde provedl 11 přidání a 5 odebrání
  1. 11 5
      app/Service/TestService.php

+ 11 - 5
app/Service/TestService.php

@@ -705,7 +705,9 @@ class TestService extends Service
             "iRowNo"    => 1,
             "cInvCode"      => $data['material_code'],
             "iQuantity"     => $qty,
+            "iNQuantity"     => $qty,
             "iPOsID" => $data['detail_id'] ?? 0,
+            "cPOID" => $data['cMemo'] ?? null,
             "iOriTaxCost"   => (float)$taxUnitPrice, // 原币含税单价
             "iOriCost"      => (float)$iUnitPrice,    // 原币无税单价
             "iOriMoney"     => (float)$iMoney,       // 原币无税金额
@@ -715,6 +717,9 @@ class TestService extends Service
             "cBatch"        => $data['batch'] ?? null,
             "dMadeDate"     => $data['made_date'] ?? null,
             "dVDate"        => $data['valid_date'] ?? null,
+            "cdefineObj" => [
+                "cbdefine2" => $qty
+            ]
         ];
 
         if ($common_array['site'] == "LFMY") {
@@ -730,8 +735,8 @@ class TestService extends Service
         } elseif ($common_array['site'] == "HCLT") {
             // 恒昌结构 (cfree + cdefine22/23 + cdefine28-31)
             $extData = [
-                'cFree1'    => $data['customer_brand'] ?? null,
-                'cFree2'    => $data['color'] ?? null,
+                'cFree1'    => $data['customer_brand'] ?? '无',
+                'cFree2'    => $data['color'] ?? '无',
                 'cFree3'    => $data['bar_code'] ?? '无',
                 'cDefine22' => $data['plan_no'] ?? null,
                 'cDefine23' => $data['contract_no'] ?? null,
@@ -754,13 +759,14 @@ class TestService extends Service
                     "IsVerify"      => true,
                     "bCalPrice"     => true,          // 开启自动计算
                     "PriceCalKey"   => "iOriTaxCost", // 以含税单价为准
+                    "cOrderCode"   => $data['cMemo'] ?? null, // 采购订单号
                     "cWhCode"       => $data['warehouse_code'] ?? "",
                     "cVenCode"      => $data['supplier_code'] ?? "",
                     "cRdCode"       => $data['cRdCode'] ?? "101", //收发类别
                     "iExchRate"     => $data['iExchRate'] ?? 1.0,
                     "iTaxRate"      => (float)$taxRate,
                     "cExch_Name"    => "人民币",
-                    "cSource"       => "库存",
+                    "cSource"       => "采购订单",
                     "cBusType"      => "普通采购",
                     "cMemo"         => $data['cMemo'] ?? "接口生成",
                     "dDate"         => date("Y-m-d"),
@@ -819,8 +825,8 @@ class TestService extends Service
         } elseif ($common_array['site'] == "HCLT") {
             // 恒昌结构 (cfree + cdefine22/23 + cdefine28-31)
             $extData = [
-                'cFree1'    => $data['customer_brand'] ?? null,
-                'cFree2'    => $data['color'] ?? null,
+                'cFree1'    => $data['customer_brand'] ?? '无',
+                'cFree2'    => $data['color'] ?? '无',
                 'cFree3'    => $data['bar_code'] ?? '无',
                 'cDefine22' => $data['plan_no'] ?? null,
                 'cDefine23' => $data['contract_no'] ?? null,