|
|
@@ -31,7 +31,7 @@ class PurchaseService extends BaseService
|
|
|
public static function createPurchase($data, $ghs)
|
|
|
{
|
|
|
//零售采购单
|
|
|
- $respond = PurchaseClass::addPurchase($data,$ghs);
|
|
|
+ $respond = PurchaseClass::addPurchase($data, $ghs);
|
|
|
|
|
|
//供应商销售单
|
|
|
$ghsId = $data['ghsId'] ?? 0;
|
|
|
@@ -59,6 +59,7 @@ class PurchaseService extends BaseService
|
|
|
$couponId = $data['couponId'] ?? 0;
|
|
|
$discountType = $respond->discountType ?? dict::getDict('discountType', 'noDiscount');
|
|
|
$discountAmount = $respond->discountAmount ?? 0;
|
|
|
+ $discount = $respond->discount ?? 0;
|
|
|
$remark = $data['remark'] ?? '';
|
|
|
$xj = $data['xj'] ?? '';
|
|
|
$sendTimeWant = isset($data['sendTimeWant']) && !empty($data['sendTimeWant']) ? $data['sendTimeWant'] : date("Y-m-d");
|
|
|
@@ -89,6 +90,7 @@ class PurchaseService extends BaseService
|
|
|
'couponId' => $couponId,
|
|
|
'discountType' => $discountType,
|
|
|
'discountAmount' => $discountAmount,
|
|
|
+ 'discount' => $discount,
|
|
|
'remark' => $remark,
|
|
|
'xj' => $xj,
|
|
|
'sendTimeWant' => $sendTimeWant,
|