Commit 43b95860 by 杨树贤

银行信息同步因为供应商名称一样所以要汇总

parent f695cd3e
Showing with 5 additions and 3 deletions
......@@ -83,10 +83,12 @@ class SyncSupplierService
if (!empty($supplier['currency'])) {
$message['currencyNumber'] = array_get(config('sync.SyncCurrencyType'), $supplier['currency']);
}
$supplierIds = SupplierChannelModel::where('supplier_name', $supplier['supplier_name'])
->where('is_type', 0)->where('group_code', '!=', '')
->pluck('supplier_id')->toArray();
//银行信息
$receipts = SupplierReceiptModel::where('supplier_id', $supplierId)->get()->toArray();
//->where('bank_name', '!=', '')->where('account_no', '!=', '')->get()->toArray();
$receipts = SupplierReceiptModel::whereIn('supplier_id', $supplierIds)->get()->toArray();
//->where('bank_name', '!=', '')->where('account_no', '!=', '')->get()->toArray();
if (!empty($receipts)) {
$message['bankinfo'] = [];
foreach ($receipts as $receipt) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment