Browse Source

bug.

master
yibo 7 years ago
parent
commit
476b66916d
2 changed files with 29 additions and 9 deletions
  1. +7
    -4
      BWP.B3ButcherManageExport/BL/NC/StatPayToNcBL_/StatPayToNcBL.cs
  2. +22
    -5
      BWP.B3ButcherManageExport/BL/NC/script/大红门结算单导NC凭证.py

+ 7
- 4
BWP.B3ButcherManageExport/BL/NC/StatPayToNcBL_/StatPayToNcBL.cs View File

@ -123,11 +123,14 @@ namespace BWP.B3ButcherManageExport.BL
{
using (var reader = session.ExecuteReader(query))
{
list.Add(new StatPay_Exception()
while (reader.Read())
{
StatPay_ID = (long)reader[0],
Money = Convert.ToDecimal(reader[1] ?? 0)
});
list.Add(new StatPay_Exception()
{
StatPay_ID = (long)reader[0],
Money = Convert.ToDecimal(reader[1] ?? 0)
});
}
}
}
return list;


+ 22
- 5
BWP.B3ButcherManageExport/BL/NC/script/大红门结算单导NC凭证.py View File

@ -6,6 +6,8 @@ from System import Convert;
class BLMethodEvents(BLMethodEventsBase):
def before(self):
self.proxy.LoadFullDom = 0;
self.proxy.MinDmoProperties.Add("ID");
self.proxy.MinDmoProperties.Add("Date");
self.proxy.MinDmoProperties.Add("Supplier_Name");
self.proxy.MinDmoProperties.Add("AccountingUnit_ID");
@ -16,7 +18,7 @@ class BLMethodEvents(BLMethodEventsBase):
self.proxy.MinDmoProperties.Add("RawPrice");#毛重单价
self.proxy.MinDmoProperties.Add("Money");#应付金额
self.proxy.MinDmoProperties.Add("ActualMoney");#实付金额
self.proxy.AbnormalItem_ID=57;#异常项目 卸车费ID
def execute(self):
self.proxy.CheckAccountingUnit(dmos);
@ -29,7 +31,7 @@ class BLMethodEvents(BLMethodEventsBase):
statePay = dmos[0];
voucher2.Head.Company = statePay.AccountingUnit_Name;
if statePay.AccountingUnit_ID==5:
if statePay.AccountingUnit_ID==30:
voucher2.Head.VoucherType = "QHC凭证";
else:
voucher2.Head.VoucherType = "记账凭证";
@ -49,7 +51,7 @@ class BLMethodEvents(BLMethodEventsBase):
num = str(dmo.RealNumber);
weight = str(dmo.RealWeight);
abstract = self.proxy.GetDateTime(dmo.Date,"yyyy-MM-dd")+dmo.Supplier_Name +"购买生猪"+ num + ""+ weight +"KG";
if dmo.AccountingUnit_ID == 1:
if dmo.AccountingUnit_ID == 3:
entryid = entryid + 1;
entry = NcVoucherEntry();
voucher2.Body.Entrys.Add(entry);
@ -66,7 +68,7 @@ class BLMethodEvents(BLMethodEventsBase):
num = str(dmo.RealNumber);
weight = str(dmo.RealWeight);
abstract = self.proxy.GetDateTime(dmo.Date,"yyyy-MM-dd")+dmo.Supplier_Name +"购买生猪"+ num + ""+ weight +"KG";
if dmo.AccountingUnit_ID == 1:
if dmo.AccountingUnit_ID == 3:
entryid = entryid + 1;
entry = NcVoucherEntry();
voucher2.Body.Entrys.Add(entry);
@ -80,4 +82,19 @@ class BLMethodEvents(BLMethodEventsBase):
item =Items();
item.Name = "供应商辅助核算";
item.Value = dmo.Supplier_Name;
entry.Accountings.Items.Add(item);
entry.Accountings.Items.Add(item);
for detail in dmo.ExceptionDetails:
entryid = entryid + 1;
entry2 = NcVoucherEntry();
voucher2.Body.Entrys.Add(entry2);
entry2.EntryId = str(entryid);
entry2.AccountCode = "其他应付款\集团外其他应付款\其他\其他";
entry2.Abstract = abstract;
entry2.Currency = "CNY";
entry2.ExchangeRate2 = "1" ;
entry2.PrimaryCreditAmount = str(-detail.Money);
entry2.NaturalCreditCurrency = str(-detail.Money);
item2 =Items();
item2.Name = "客商辅助核算";
item2.Value = "陈新安";
entry2.Accountings.Items.Add(item2);

Loading…
Cancel
Save