|
@@ -28,8 +28,10 @@ import javax.swing.table.TableCellRenderer;
|
|
|
|
|
|
import nc.bs.framework.common.InvocationInfoProxy;
|
|
|
import nc.bs.framework.common.NCLocator;
|
|
|
+import nc.bs.hr.plugin.GetDataUtil;
|
|
|
import nc.desktop.ui.WorkbenchEnvironment;
|
|
|
import nc.hr.utils.OutputDialogUtil;
|
|
|
+import nc.itf.hr.IReceivableService;
|
|
|
import nc.itf.hr.SocialInsuranceAllMaintain;
|
|
|
import nc.itf.uap.IUAPQueryBS;
|
|
|
import nc.jdbc.framework.SQLParameter;
|
|
@@ -38,6 +40,7 @@ import nc.jdbc.framework.processor.ColumnListProcessor;
|
|
|
import nc.jdbc.framework.processor.ColumnProcessor;
|
|
|
import nc.jdbc.framework.processor.MapListProcessor;
|
|
|
import nc.jdbc.framework.processor.MapProcessor;
|
|
|
+import nc.log.NcLog;
|
|
|
import nc.ui.pub.ButtonObject;
|
|
|
import nc.ui.pub.ToftPanel;
|
|
|
import nc.ui.pub.beans.MessageDialog;
|
|
@@ -48,6 +51,9 @@ import nc.ui.pub.beans.UITablePane;
|
|
|
import nc.ui.pub.beans.ValueChangedEvent;
|
|
|
import nc.ui.pub.beans.ValueChangedListener;
|
|
|
import nc.ui.pub.link.BillLinkOneNodeCenter;
|
|
|
+import nc.vo.arap.receivable.AggReceivableBillVO;
|
|
|
+import nc.vo.arap.receivable.ReceivableBillItemVO;
|
|
|
+import nc.vo.arap.receivable.ReceivableBillVO;
|
|
|
import nc.vo.fipub.exception.ExceptionHandler;
|
|
|
import nc.vo.fipub.freevalue.Module;
|
|
|
import nc.vo.gl.pubvoucher.DetailVO;
|
|
@@ -59,6 +65,7 @@ import nc.vo.pub.BusinessException;
|
|
|
import nc.vo.pub.SuperVO;
|
|
|
import nc.vo.pub.lang.UFBoolean;
|
|
|
import nc.vo.pub.lang.UFDate;
|
|
|
+import nc.vo.pub.lang.UFDateTime;
|
|
|
import nc.vo.pub.lang.UFDouble;
|
|
|
import nc.vo.pubapp.pattern.data.ValueUtils;
|
|
|
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
|
@@ -79,6 +86,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
private ButtonObject bt_output = new ButtonObject("导出", "", 2, "bt_output");
|
|
|
private ButtonObject bt_voucher = new ButtonObject("生成凭证", "", 2, "bt_voucher");
|
|
|
private ButtonObject bt_linkvouchar = new ButtonObject("联查凭证", "", 2, "bt_linkvouchar");
|
|
|
+ private ButtonObject bt_arrecbill = new ButtonObject("生成内部应收单", "", 2, "bt_arrecbill");
|
|
|
|
|
|
private JProgressBar pb;
|
|
|
private UITablePane tablepanel = null;
|
|
@@ -95,8 +103,8 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
private String[] subheading = { "序号", "员工编号", "姓名", "缴费基数", "个人部分", "公司部分", "备注" };
|
|
|
private String orgCode;
|
|
|
private String period;
|
|
|
- private Map<String, Map<String, UFDouble>> beforePsgMoney = null;
|
|
|
- private Map<String, Map<String, UFDouble>> afterPsgMoney = null;
|
|
|
+ private Map<String, Map<String, UFDouble>> beforePsgMoney = null;
|
|
|
+ private Map<String, Map<String, UFDouble>> afterPsgMoney = null;
|
|
|
Map<String, Map<String, String>> middleTableData = null;
|
|
|
private SocialInsuranceAllMaintain siaMaintain = NCLocator.getInstance().lookup(SocialInsuranceAllMaintain.class);
|
|
|
private Map<String, UFDouble> tableFourSelfMap = null;
|
|
@@ -115,11 +123,23 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
|
|
|
public void initialize() {
|
|
|
- setLayout(new BorderLayout());
|
|
|
- add(getUIPanel0(), BorderLayout.NORTH);
|
|
|
- add(getUIPanel2(), BorderLayout.CENTER);
|
|
|
- add(getUIPanel4(), BorderLayout.SOUTH);
|
|
|
- setButtons(new ButtonObject[] { this.bt_query, this.bt_insert, this.bt_update, this.bt_output, this.bt_voucher, this.bt_linkvouchar });
|
|
|
+ try {
|
|
|
+ setLayout(new BorderLayout());
|
|
|
+ add(getUIPanel0(), BorderLayout.NORTH);
|
|
|
+ add(getUIPanel2(), BorderLayout.CENTER);
|
|
|
+ add(getUIPanel4(), BorderLayout.SOUTH);
|
|
|
+ String cuserid = InvocationInfoProxy.getInstance().getUserId();
|
|
|
+ String roleCode = GetDataUtil.powerRole(cuserid);
|
|
|
+ if("GJJ_HR001".equals(roleCode)) {
|
|
|
+ setButtons(new ButtonObject[] { this.bt_query, this.bt_insert, this.bt_update, this.bt_output });
|
|
|
+ }else if("GJJ_CW001".equals(roleCode)){
|
|
|
+ setButtons(new ButtonObject[] { this.bt_query, this.bt_output, this.bt_voucher, this.bt_linkvouchar, this.bt_arrecbill });
|
|
|
+ }else {
|
|
|
+ setButtons(new ButtonObject[] { this.bt_query, this.bt_insert, this.bt_update, this.bt_output, this.bt_voucher, this.bt_linkvouchar, this.bt_arrecbill });
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ MessageDialog.showHintDlg(this, "提示", e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private UILabel getOrgLabel() {
|
|
@@ -293,20 +313,15 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
onoutput();
|
|
|
} else if ("bt_linkvouchar".equals(bt.getCode())) {
|
|
|
String pkvouchersql = "select voucher_pk from voucher_flag where tablename='公积金分摊表' and orgcode='" + orgCode + "' and period='" + period + "' and nvl(dr,0)=0 ";
|
|
|
-
|
|
|
Object voucher_pk = iuap.executeQuery(pkvouchersql, new ColumnProcessor());
|
|
|
-
|
|
|
if (null != voucher_pk) {
|
|
|
String sqlvoucher = "select num from gl_voucher where pk_voucher='" + voucher_pk + "' ";
|
|
|
Object vouchernum = iuap.executeQuery(sqlvoucher, new ColumnProcessor());
|
|
|
if (null != vouchernum) {
|
|
|
-
|
|
|
VoucherVO[] aggvos = GLPubProxy.getRemoteVoucher().queryByPks(new String[] { voucher_pk.toString() });
|
|
|
-
|
|
|
BillLinkOneNodeCenter.linkQuery_Dialog(this, "C0", new String[] { voucher_pk.toString() }, aggvos, true);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
} else if ("bt_voucher".equals(bt.getCode())) {
|
|
|
String pkvouchersql = "select voucher_pk from voucher_flag where tablename='公积金分摊表' and orgcode='" + orgCode + "' and period='" + period + "' and nvl(dr,0)=0 ";
|
|
|
Object voucher_pk = iuap.executeQuery(pkvouchersql, new ColumnProcessor());
|
|
@@ -325,7 +340,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
|
|
|
Map<String, UFDouble> voucheramount = getVoucherAmount(getTablePanel());
|
|
|
VoucherVO voucher = getVoucherVO(voucheramount);
|
|
|
-
|
|
|
for (DetailVO detail : voucher.getDetails()) {
|
|
|
if (detail.getAss() != null && detail.getAss().length > 0) {
|
|
|
String assIDs = GLPubProxy.getRemoteFreevaluePub().getAssID_RequiresNew(detail.getAss(), false, "", InvocationInfoProxy.getInstance().getGroupId(), Module.GL);
|
|
@@ -333,7 +347,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
}
|
|
|
OperationResultVO[] rs = GLPubProxy.getRemoteVoucher().save((VoucherVO) voucher, new Boolean(true));
|
|
|
-
|
|
|
|
|
|
String pk = rs[0].m_strPK;
|
|
|
StringBuilder insertSQL = new StringBuilder("insert into voucher_flag (TABLENAME, ORGCODE, PERIOD, VOUCHER_PK) values (");
|
|
@@ -342,11 +355,22 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
insertSQL.append("'").append(period).append("', ");
|
|
|
insertSQL.append("'").append(pk).append("'); ");
|
|
|
siaMaintain.executeBaseDAO(insertSQL.toString());
|
|
|
-
|
|
|
MessageDialog.showHintDlg(this, "提示", "凭证已生成");
|
|
|
-
|
|
|
+ } else if ("bt_arrecbill".equals(bt.getCode())) {
|
|
|
+
|
|
|
+ String pk_recbillsql = "select pk_recbill from ar_recbill where def11='公积金分摊表_" + orgCode + "_" + period + "' and nvl(dr,0)=0 ";
|
|
|
+ Object pk_recbill = iuap.executeQuery(pk_recbillsql, new ColumnProcessor());
|
|
|
+ if (null != pk_recbill) {
|
|
|
+ ExceptionUtils.wrappBusinessException("内部应收单【" + period + "】已经生成!不能重复生成!");
|
|
|
+ }
|
|
|
+ MessageDialog.showHintDlg(this, "", "生成内部应收单开始");
|
|
|
+
|
|
|
+ String billNO = addReceivableBill(getTablePanel());
|
|
|
+ MessageDialog.showHintDlg(this, "提示", "内部应收单已生成 " + billNO);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ NcLog.info(e.getMessage());
|
|
|
MessageDialog.showHintDlg(this, "提示", e.getMessage());
|
|
|
}
|
|
|
}
|
|
@@ -409,7 +433,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
UFDouble tableSixOrg = tableMap.get("tableSix").get("org");
|
|
|
UFDouble tableSevenStaff = tableMap.get("tableSeven").get("staff");
|
|
|
UFDouble tableSevenOrg = tableMap.get("tableSeven").get("org");
|
|
|
-
|
|
|
UFDouble queryTableNine = nvl(queryTableNine(orgCode, period), 2);
|
|
|
Map<String, String> TableTenMap = queryTableTen(orgCode, period);
|
|
|
UFDouble TableTenStaff = nvl(TableTenMap.get("so_staff_sum"), 2);
|
|
@@ -452,8 +475,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
};
|
|
|
tablepanel.getTable().setModel(model);
|
|
|
- tablepanel.getTable().setColumnWidth(new int[] { 300, 150, 150, 280, 150, 150, 190, 190, 160 });
|
|
|
-
|
|
|
+ tablepanel.getTable().setColumnWidth(new int[] { 300, 150, 150, 300, 150, 150, 200, 190, 160 });
|
|
|
TableCellRenderer renderer = new DefaultTableCellRenderer() {
|
|
|
@Override
|
|
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
|
@@ -470,7 +492,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
} else {
|
|
|
setForeground(Color.BLACK);
|
|
|
}
|
|
|
-
|
|
|
|
|
|
return this;
|
|
|
}
|
|
@@ -494,7 +515,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
String orgMoney = null;
|
|
|
|
|
|
String combinedField = title + (orgName == null ? "" : orgName) + clerkcode + clerkname;
|
|
|
-
|
|
|
|
|
|
Map<String, String> middleTableMap = middleTableData.get(combinedField);
|
|
|
|
|
@@ -523,7 +543,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
mapMoney.put("beforePsgOrgMoney", beforePsgOrgMoney);
|
|
|
beforePsgMoney.put(clerkcode, mapMoney);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -548,7 +567,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
if ("表七:实际未缴当月工资个人部分已扣".equals(title)) {
|
|
|
tableSevenSelfMap = new HashMap<String, UFDouble>();
|
|
|
}
|
|
|
-
|
|
|
dataList.add(new Object[] { title });
|
|
|
dataList.add(subheading);
|
|
|
Map<String, UFDouble> MapMoney = new HashMap<String, UFDouble>();
|
|
@@ -632,7 +650,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
|
|
|
dataList.add(new Object[] { i + 1, clerkcode, clerkname, basicsMoney, staffMoney, orgMoney, mark, str + orgName });
|
|
|
-
|
|
|
if ("表一:由个人承担".equals(title)) {
|
|
|
tableOneOrgMap.put(clerkcode + "," + clerkname, orgMoney);
|
|
|
}
|
|
@@ -642,7 +659,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
if ("表七:实际未缴当月工资个人部分已扣".equals(title)) {
|
|
|
tableSevenSelfMap.put(clerkcode + "," + clerkname, staffMoney);
|
|
|
}
|
|
|
-
|
|
|
|
|
|
staffSubtotal = staffSubtotal.add(staffMoney);
|
|
|
orgSubtotal = orgSubtotal.add(orgMoney);
|
|
@@ -662,14 +678,12 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
if ("表四:个人部分已在集团内其他公司扣除".equals(title)) {
|
|
|
tableFourSelfMap.put(orgName, staffSubtotal);
|
|
|
}
|
|
|
-
|
|
|
staffSubtotal = new UFDouble(0.00, 2);
|
|
|
orgSubtotal = new UFDouble(0.00, 2);
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
dataList.add(new Object[] { i + 1, clerkcode, clerkname, basicsMoney, staffMoney, orgMoney, mark, str });
|
|
|
-
|
|
|
if ("表一:由个人承担".equals(title)) {
|
|
|
tableOneOrgMap.put(clerkcode + "," + clerkname, orgMoney);
|
|
|
}
|
|
@@ -930,7 +944,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
sql.append(" )ORDER BY orgname");
|
|
|
return (List<Map<String, String>>) iuap.executeQuery(sql.toString(), new MapListProcessor());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
* 查询实际集团内其他公司已缴当月工资个人部分已扣
|
|
|
*
|
|
@@ -951,7 +965,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
sql.append(" ORDER BY CONTRIBUTORYORG");
|
|
|
return (List<Map<String, String>>) iuap.executeQuery(sql.toString(), new MapListProcessor());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
* 查询工资表扣缴数
|
|
|
*
|
|
@@ -1027,7 +1041,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
public UFDouble nvl(Object obj, int power) {
|
|
|
return MathTool.nvl(ValueUtils.getUFDouble(obj)).setScale(2, UFDouble.ROUND_HALF_UP);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
* 导出
|
|
|
*/
|
|
@@ -1039,10 +1053,9 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
|
|
|
|
|
|
- * 获取修改数据打开修改界面
|
|
|
+ * 获取修改数据打开修改界面 修改数据
|
|
|
*
|
|
|
* @param table
|
|
|
- * 修改数据
|
|
|
*/
|
|
|
private void update(UITablePane table) {
|
|
|
try {
|
|
@@ -1092,14 +1105,14 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ *
|
|
|
* 组装凭证借贷金额
|
|
|
*
|
|
|
* @param tablepane
|
|
|
+ *
|
|
|
*/
|
|
|
private Map<String, UFDouble> getVoucherAmount(UITablePane tablepane) {
|
|
|
-
|
|
|
Map<String, UFDouble> map = new LinkedHashMap<String, UFDouble>();
|
|
|
-
|
|
|
|
|
|
Object objgs = tablepane.getTable().getValueAt(2, 2);
|
|
|
|
|
@@ -1156,9 +1169,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
|
|
|
UFDouble bsbmhj = bmgs.add(bmgr);
|
|
|
|
|
|
-
|
|
|
- * 借方:其他应收款/单位往来/对应公司-上海茗杰商务咨询有限公司 注:辅助核算客商和人关联的,尤咏杰---上海茗杰商务咨询有限公司
|
|
|
- */
|
|
|
+
|
|
|
|
|
|
UFDouble wbgs = objwbgs == null ? UFDouble.ZERO_DBL : new UFDouble(objwbgs.toString());
|
|
|
UFDouble wbgr = objwbgr == null ? UFDouble.ZERO_DBL : new UFDouble(objwbgr.toString());
|
|
@@ -1169,23 +1180,21 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
|
|
|
UFDouble bsgr = objbsgr == null ? UFDouble.ZERO_DBL : new UFDouble(objbsgr.toString());
|
|
|
|
|
|
-
|
|
|
- * 生成的凭证自动加一行借方数据,等于管理费用/社会保险费/部门:其他虚拟财务与应付账款/预估成本/办公费/部门:合计值 借方:应付职工薪酬/住房公积金
|
|
|
- **/
|
|
|
+
|
|
|
|
|
|
UFDouble gjjhj = gjjcmpamout.add(bsbmhj);
|
|
|
|
|
|
|
|
|
|
|
|
UFDouble jsibcomount = objsibco == null ? UFDouble.ZERO_DBL : new UFDouble(objsibco.toString());
|
|
|
+
|
|
|
+ UFDouble xjsibcomount = jsibcomount.sub(bsgr);
|
|
|
|
|
|
|
|
|
|
|
|
UFDouble bqgrmx = objbqgr == null ? UFDouble.ZERO_DBL : new UFDouble(objbqgr.toString());
|
|
|
|
|
|
-
|
|
|
- * 生成的凭证自动加一行借方数据,等于管理费用/社会保险费/部门:其他虚拟财务与应付账款/预估成本/办公费/部门:合计值 贷方:应付职工薪酬/住房公积金
|
|
|
- **/
|
|
|
+
|
|
|
|
|
|
UFDouble gjjhd = gjjcmpamout.add(bsbmhj);
|
|
|
|
|
@@ -1194,26 +1203,22 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
map.put("其他应收款/个人往来", byblhj);
|
|
|
map.put("应付账款/预估成本/办公费", bsbmhj);
|
|
|
map.put("其他应收款/单位往来", wbgshj);
|
|
|
- map.put("其他应收款/内部往来", bsgr);
|
|
|
+
|
|
|
map.put("应付职工薪酬/住房公积金", gjjhj);
|
|
|
- map.put("预付账款/待摊费用/贷方", jsibcomount);
|
|
|
+ map.put("预付账款/待摊费用/贷方", xjsibcomount);
|
|
|
map.put("其他应收款/个人往来/贷方", bqgrmx);
|
|
|
map.put("应付职工薪酬/住房公积金/贷方", gjjhd);
|
|
|
-
|
|
|
return map;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
public VoucherVO getVoucherVO(Map<String, UFDouble> map) throws Exception {
|
|
|
-
|
|
|
VoucherVO voucher = new VoucherVO();
|
|
|
String pk_org = getPk_financeorg(orgCode);
|
|
|
-
|
|
|
|
|
|
String pk_group = InvocationInfoProxy.getInstance().getGroupId();
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
Date newDate = convertStringToDate(period + "-01", "yyyy-MM-dd");
|
|
|
String nexMonthDate = getMonthFirstDate(newDate);
|
|
|
String year = nexMonthDate.substring(0, 4);
|
|
@@ -1222,7 +1227,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
String pk_accountGlbook = tran_accountingbook(pk_org);
|
|
|
String pk_vouchertype = vouchertypeGetCode("03");
|
|
|
String pk_org_v = getPkorgv(pk_org);
|
|
|
-
|
|
|
voucher.setPk_vouchertype(pk_vouchertype);
|
|
|
voucher.setAttachment(0);
|
|
|
voucher.setDetailmodflag(UFBoolean.TRUE);
|
|
@@ -1246,11 +1250,8 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
voucher.setPk_org_v(pk_org_v);
|
|
|
voucher.setPk_group(pk_group);
|
|
|
voucher.setPk_accountingbook(pk_accountGlbook);
|
|
|
-
|
|
|
ArrayList<DetailVO> itemarr = new ArrayList<DetailVO>();
|
|
|
-
|
|
|
for (Entry<String, UFDouble> entry : map.entrySet()) {
|
|
|
-
|
|
|
String key = entry.getKey();
|
|
|
String km_code = "";
|
|
|
UFDouble creditamount = UFDouble.ZERO_DBL;
|
|
@@ -1268,7 +1269,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
arrassvo.add(assvos[0]);
|
|
|
itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
|
|
|
itemarr.add(itemVO);
|
|
|
-
|
|
|
} else if ("其他应收款/五险一金".equals(key)) {
|
|
|
km_code = "122104";
|
|
|
debitamount = entry.getValue();
|
|
@@ -1276,7 +1276,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
DetailVO itemVO = new DetailVO();
|
|
|
getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金");
|
|
|
itemarr.add(itemVO);
|
|
|
-
|
|
|
} else if ("其他应收款/个人往来".equals(key)) {
|
|
|
km_code = "122102";
|
|
|
debitamount = entry.getValue();
|
|
@@ -1302,7 +1301,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
UFDouble debitamounttotal1 = debitamounttotal;
|
|
|
}
|
|
|
-
|
|
|
if (null != tableSixSelfMap) {
|
|
|
UFDouble debitamounttotal = new UFDouble();
|
|
|
for (Entry<String, UFDouble> tableSixSelfEntry : tableSixSelfMap.entrySet()) {
|
|
@@ -1324,7 +1322,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
UFDouble debitamounttotal1 = debitamounttotal;
|
|
|
}
|
|
|
-
|
|
|
} else if ("应付账款/预估成本/办公费".equals(key)) {
|
|
|
km_code = "22020205";
|
|
|
debitamount = entry.getValue();
|
|
@@ -1341,7 +1338,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
arrassvo.add(assvos2[0]);
|
|
|
itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
|
|
|
itemarr.add(itemVO);
|
|
|
-
|
|
|
} else if ("其他应收款/单位往来".equals(key)) {
|
|
|
km_code = "122101";
|
|
|
debitamount = entry.getValue();
|
|
@@ -1354,40 +1350,39 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
arrassvo.add(assvos[0]);
|
|
|
itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
|
|
|
itemarr.add(itemVO);
|
|
|
-
|
|
|
- } else if ("其他应收款/内部往来".equals(key)) {
|
|
|
-
|
|
|
- km_code = "12210503";
|
|
|
- debitamount = entry.getValue();
|
|
|
- pk_accasoa = tranKm(km_code, pk_accountGlbook);
|
|
|
- if (null != tableFourSelfMap) {
|
|
|
- UFDouble debitamounttotal = new UFDouble();
|
|
|
- for (Entry<String, UFDouble> tableFourSelfEntry : tableFourSelfMap.entrySet()) {
|
|
|
- String orgName = tableFourSelfEntry.getKey();
|
|
|
- UFDouble debitamountOrg = tableFourSelfEntry.getValue();
|
|
|
- debitamounttotal = debitamounttotal.add(debitamountOrg);
|
|
|
- if (debitamountOrg.doubleValue() != 0) {
|
|
|
- DetailVO itemVO = new DetailVO();
|
|
|
- getDetailvo(itemVO, pk_accasoa, creditamount, debitamountOrg, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
|
|
|
-
|
|
|
- AssVO[] assvos = getAss(pk_accasoa, "0004", getbd_cust_supplier_code(orgName), pk_org);
|
|
|
- ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
|
|
|
- arrassvo.add(assvos[0]);
|
|
|
- itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
|
|
|
- itemarr.add(itemVO);
|
|
|
- }
|
|
|
- }
|
|
|
- UFDouble debitamounttotal1 = debitamounttotal;
|
|
|
- }
|
|
|
-
|
|
|
- } else if ("应付职工薪酬/住房公积金".equals(key)) {
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ else if ("应付职工薪酬/住房公积金".equals(key)) {
|
|
|
km_code = "221106";
|
|
|
debitamount = entry.getValue();
|
|
|
pk_accasoa = tranKm(km_code, pk_accountGlbook);
|
|
|
DetailVO itemVO = new DetailVO();
|
|
|
getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
|
|
|
itemarr.add(itemVO);
|
|
|
-
|
|
|
} else if ("预付账款/待摊费用/贷方".equals(key)) {
|
|
|
|
|
|
km_code = "112301";
|
|
@@ -1402,7 +1397,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
arrassvo.add(assvos[0]);
|
|
|
itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
|
|
|
itemarr.add(itemVO);
|
|
|
-
|
|
|
} else if ("其他应收款/个人往来/贷方".equals(key)) {
|
|
|
km_code = "122102";
|
|
|
creditamount = entry.getValue();
|
|
@@ -1438,13 +1432,10 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
}
|
|
|
voucher.setDetails((DetailVO[]) itemarr.toArray(new DetailVO[0]));
|
|
|
-
|
|
|
return voucher;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private DetailVO getDetailvo(DetailVO itemVO, String pk_accasoa, UFDouble creditamount, UFDouble debitamount, VoucherVO voucher, String explanation) throws BusinessException {
|
|
|
-
|
|
|
String pk_currtype = getcurrtype("CNY");
|
|
|
itemVO.setPk_accasoa(pk_accasoa);
|
|
|
itemVO.setCreditamount(creditamount);
|
|
@@ -1478,9 +1469,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
itemVO.setPk_unit(voucher.getPk_org());
|
|
|
itemVO.setPk_unit_v(voucher.getPk_org_v());
|
|
|
itemVO.setPk_currtype(pk_currtype);
|
|
|
-
|
|
|
return itemVO;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private AssVO[] getAss(String pk_km, String code1, String pk_checkvalue1, String pk_org) throws ClassNotFoundException, BusinessException {
|
|
@@ -1500,26 +1489,21 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
if (ass_arr != null) {
|
|
|
for (int j = 0; j < ass_arr.size(); j++) {
|
|
|
HashMap assmap = (HashMap) ass_arr.get(j);
|
|
|
-
|
|
|
String getRefnodename = assmap.get("refnodename") + "";
|
|
|
-
|
|
|
String fullclassname = assmap.get("fullclassname") + "";
|
|
|
SuperVO refvo = initSuperVOClass(Class.forName(fullclassname));
|
|
|
-
|
|
|
String qrykey = "code";
|
|
|
if ("项目".equals(getRefnodename)) {
|
|
|
qrykey = "project_code";
|
|
|
} else if ("部门".equals(getRefnodename)) {
|
|
|
qrykey = "name";
|
|
|
}
|
|
|
-
|
|
|
String refsql = "select * from " + refvo.getTableName() + " where nvl(dr,0) = 0 and ( " + qrykey + " ='" + pk_checkvalue1 + "' or " + refvo.getPKFieldName() + " = '"
|
|
|
+ pk_checkvalue1 + "' )";
|
|
|
if (refvo.getTableName().equals("org_dept")) {
|
|
|
refsql = "select * from " + refvo.getTableName() + " where nvl(dr,0) = 0 and pk_org = '" + pk_org + "' and ( " + qrykey + " ='" + pk_checkvalue1 + "' or "
|
|
|
+ refvo.getPKFieldName() + " = '" + pk_checkvalue1 + "' )";
|
|
|
} else if (refvo.getTableName().equals("bd_defdoc")) {
|
|
|
-
|
|
|
if ("公司内部专业(自定义档案)".equals(getRefnodename)) {
|
|
|
refsql = "select * from " + refvo.getTableName() + " where nvl(dr,0) = 0 and ( " + qrykey + " ='" + pk_checkvalue1 + "' or " + refvo.getPKFieldName() + " = '"
|
|
|
+ pk_checkvalue1 + "' ) " + "and pk_defdoclist =(select pk_defdoclist from bd_defdoclist where code = 'HR016' ) ";
|
|
@@ -1531,15 +1515,11 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
+ pk_checkvalue1 + "' ) " + "and pk_defdoclist =(select pk_defdoclist from bd_defdoclist where code = '14' ) ";
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
SuperVO dataVO = (SuperVO) iuap.executeQuery(refsql, new BeanProcessor(Class.forName(fullclassname)));
|
|
|
-
|
|
|
if (dataVO == null) {
|
|
|
throw new BusinessException("辅助核算翻译失败:" + pk_checkvalue1);
|
|
|
}
|
|
|
-
|
|
|
AssVO tempAss = new AssVO();
|
|
|
-
|
|
|
String pk_checkvalue = dataVO.getPrimaryKey();
|
|
|
String code = "";
|
|
|
if ("项目".equals(getRefnodename)) {
|
|
@@ -1547,7 +1527,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
} else {
|
|
|
code = dataVO.getAttributeValue("code") + "";
|
|
|
}
|
|
|
-
|
|
|
if ("".equals(getRefnodename)) {
|
|
|
|
|
|
tempAss.setPk_Checkvalue(code);
|
|
@@ -1555,11 +1534,9 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
tempAss.setChecktypecode(assmap.get("code") + "");
|
|
|
tempAss.setChecktypename(assmap.get("name") + "");
|
|
|
} else {
|
|
|
-
|
|
|
tempAss.setPk_Checktype(assmap.get("pk_accassitem") + "");
|
|
|
tempAss.setChecktypecode(assmap.get("code") + "");
|
|
|
tempAss.setChecktypename(assmap.get("name") + "");
|
|
|
-
|
|
|
if ("项目".equals(getRefnodename)) {
|
|
|
tempAss.setCheckvaluename(dataVO.getAttributeValue("project_name") + "");
|
|
|
} else {
|
|
@@ -1636,10 +1613,8 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
String sql = "select pk_vouchertype from bd_vouchertype where code = ? and nvl(dr,0) = 0 ";
|
|
|
SQLParameter parameter = new SQLParameter();
|
|
|
parameter.addParam(pk);
|
|
|
-
|
|
|
Object pk_vouchertype = iuap.executeQuery(sql, parameter, new ColumnProcessor());
|
|
|
return pk_vouchertype != null ? pk_vouchertype + "" : "";
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1649,10 +1624,8 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
String sql = "select pk_vid from org_financeorg_v where pk_financeorg = ? and nvl(dr,0) = 0 ";
|
|
|
SQLParameter parameter = new SQLParameter();
|
|
|
parameter.addParam(pk);
|
|
|
-
|
|
|
Object pk_vid = iuap.executeQuery(sql, parameter, new ColumnProcessor());
|
|
|
return pk_vid != null ? pk_vid + "" : "";
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1667,7 +1640,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
+ " and bd_accasoa.pk_accchart =\n" + " (select pk_accchart\n" + " from bd_accchart\n" + " where originalchart =\n"
|
|
|
+ " (select pk_curraccchart\n" + " from org_accountingbook\n" + " where pk_accountingbook = ? and alterchart <> '~' and\n"
|
|
|
+ " tempversionflag <> 'Y'));";
|
|
|
-
|
|
|
SQLParameter parameter = new SQLParameter();
|
|
|
parameter.addParam(km_code);
|
|
|
parameter.addParam(pk_accountingbook);
|
|
@@ -1695,7 +1667,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
|
|
|
|
|
|
private String psndocCode(String clerkcode) throws BusinessException {
|
|
|
-
|
|
|
String sql = "select bd_psndoc.code from hi_psnjob " + "inner join bd_psndoc on bd_psndoc.pk_psndoc=hi_psnjob.pk_psndoc " + "and nvl(hi_psnjob.dr,0)=0 and nvl(bd_psndoc.dr,0)=0 "
|
|
|
+ "and hi_psnjob.clerkcode='" + clerkcode + "' ";
|
|
|
Object code = (String) iuap.executeQuery(sql, new ColumnProcessor());
|
|
@@ -1703,31 +1674,22 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
}
|
|
|
|
|
|
private String getPk_financeorg(String code) throws BusinessException {
|
|
|
-
|
|
|
String sql = "select pk_financeorg from org_financeorg where code='" + code + "' and nvl(dr,0)=0 and enablestate ='2' ";
|
|
|
-
|
|
|
Object pk_financeorg = (String) iuap.executeQuery(sql, new ColumnProcessor());
|
|
|
return pk_financeorg != null ? pk_financeorg + "" : "";
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private String getpk_user(String code) throws BusinessException {
|
|
|
-
|
|
|
String sql = "select cuserid from sm_user where user_code='" + code + "' and nvl(dr,0)=0 and enablestate ='2' ";
|
|
|
-
|
|
|
Object cuserid = (String) iuap.executeQuery(sql, new ColumnProcessor());
|
|
|
return cuserid != null ? cuserid + "" : "";
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
private String getbd_cust_supplier_code(String name) throws BusinessException {
|
|
|
-
|
|
|
String sql = "select code from bd_cust_supplier where name='" + name + "' and nvl(dr,0)=0 ";
|
|
|
-
|
|
|
Object code = (String) iuap.executeQuery(sql, new ColumnProcessor());
|
|
|
return code != null ? code + "" : "";
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1738,7 +1700,6 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
|
|
Date first = calendar.getTime();
|
|
|
return convertDateToString(first, "yyyy-MM-dd");
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1773,4 +1734,157 @@ public class AccumulationFundAllocationUI extends ToftPanel {
|
|
|
return resultDate;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ *
|
|
|
+ * 生成内部应收单
|
|
|
+ *
|
|
|
+ * @throws Exception
|
|
|
+ *
|
|
|
+ */
|
|
|
+ private String addReceivableBill(UITablePane tablepane) throws Exception {
|
|
|
+ String billNO = "";
|
|
|
+ Map<String, UFDouble> map = new LinkedHashMap<String, UFDouble>();
|
|
|
+
|
|
|
+ Object objbsgr = tablepane.getTable().getValueAt(5, 2);
|
|
|
+
|
|
|
+
|
|
|
+ UFDouble bsgr = objbsgr == null ? UFDouble.ZERO_DBL : new UFDouble(objbsgr.toString());
|
|
|
+ if (null != tableFourSelfMap) {
|
|
|
+ AggReceivableBillVO aggReceivableBillVO = new AggReceivableBillVO();
|
|
|
+ ReceivableBillVO receivableBillVO = new ReceivableBillVO();
|
|
|
+
|
|
|
+ receivableBillVO.setDef11("公积金分摊表_" + orgCode + "_" + period);
|
|
|
+ String pk_org = getPk_financeorg(orgCode);
|
|
|
+
|
|
|
+ String pk_group = InvocationInfoProxy.getInstance().getGroupId();
|
|
|
+ String pk_user = InvocationInfoProxy.getInstance().getUserId();
|
|
|
+ String pk_org_v = getPkorgv(pk_org);
|
|
|
+ receivableBillVO.setBillstatus(-1);
|
|
|
+ receivableBillVO.setPk_group(pk_group);
|
|
|
+ receivableBillVO.setPk_org(pk_org);
|
|
|
+ receivableBillVO.setPk_org_v(pk_org_v);
|
|
|
+ receivableBillVO.setPk_fiorg(pk_org);
|
|
|
+ receivableBillVO.setSett_org(pk_org);
|
|
|
+ receivableBillVO.setSett_org_v(pk_org);
|
|
|
+ receivableBillVO.setBillmaker(pk_user);
|
|
|
+ receivableBillVO.setBilldate(new UFDate());
|
|
|
+ receivableBillVO.setCreator(pk_user);
|
|
|
+ receivableBillVO.setCreationtime(new UFDateTime());
|
|
|
+ receivableBillVO.setBusidate(new UFDate());
|
|
|
+ receivableBillVO.setObjtype(0);
|
|
|
+ receivableBillVO.setPk_deptid(GetDataUtil.getDeptPK("000101205"));
|
|
|
+ receivableBillVO.setLocal_money(bsgr);
|
|
|
+ receivableBillVO.setMoney(bsgr);
|
|
|
+ String pk_bankaccsub = GetDataUtil.getBankaccsubPK("310066218018000420123");
|
|
|
+ receivableBillVO.setRecaccount(pk_bankaccsub);
|
|
|
+ receivableBillVO.setPk_busitype(GetDataUtil.getBusitypePK("AR01"));
|
|
|
+ receivableBillVO.setBillclass("ys");
|
|
|
+ String year = period.substring(0, 4);
|
|
|
+ String month = period.substring(5, 7);
|
|
|
+ receivableBillVO.setBillyear(year);
|
|
|
+ receivableBillVO.setBillperiod(month);
|
|
|
+ receivableBillVO.setIsreded(UFBoolean.FALSE);
|
|
|
+ receivableBillVO.setIsflowbill(UFBoolean.FALSE);
|
|
|
+ receivableBillVO.setPk_billtype("F0");
|
|
|
+ String pk_currtype = getcurrtype("CNY");
|
|
|
+ receivableBillVO.setPk_currtype(pk_currtype);
|
|
|
+ receivableBillVO.setPk_balatype(GetDataUtil.getBalatypePK("12"));
|
|
|
+ String pk_country = GetDataUtil.getCountryzonePK("CN");
|
|
|
+ receivableBillVO.setSendcountryid(pk_country);
|
|
|
+ receivableBillVO.setTaxcountryid(pk_country);
|
|
|
+ receivableBillVO.setSubjcode("112301");
|
|
|
+ receivableBillVO.setSrc_syscode(0);
|
|
|
+ receivableBillVO.setSyscode(0);
|
|
|
+ receivableBillVO.setScomment("S00009");
|
|
|
+ receivableBillVO.setMoney(bsgr);
|
|
|
+
|
|
|
+ String pk_tradetype = "F0-Cxx-01";
|
|
|
+ receivableBillVO.setPk_tradetype(pk_tradetype);
|
|
|
+ String pk_billtypeid = GetDataUtil.getBilltypePK(pk_tradetype, pk_group);
|
|
|
+ receivableBillVO.setPk_tradetypeid(pk_billtypeid);
|
|
|
+ receivableBillVO.setIsflowbill(UFBoolean.FALSE);
|
|
|
+ receivableBillVO.setIsreded(UFBoolean.FALSE);
|
|
|
+ aggReceivableBillVO.setParentVO(receivableBillVO);
|
|
|
+ List<ReceivableBillItemVO> listItemVO = new ArrayList<ReceivableBillItemVO>();
|
|
|
+ int rowNo = 0;
|
|
|
+ for (Entry<String, UFDouble> tableFourSelfEntry : tableFourSelfMap.entrySet()) {
|
|
|
+ rowNo++;
|
|
|
+ String orgName = tableFourSelfEntry.getKey();
|
|
|
+ UFDouble debitamount = tableFourSelfEntry.getValue();
|
|
|
+ if (debitamount.doubleValue() != 0) {
|
|
|
+ ReceivableBillItemVO receivableBillItemVO = new ReceivableBillItemVO();
|
|
|
+
|
|
|
+ receivableBillItemVO.setPk_org(pk_org);
|
|
|
+ receivableBillItemVO.setPk_org_v(pk_org_v);
|
|
|
+ receivableBillItemVO.setPk_group(pk_group);
|
|
|
+ receivableBillItemVO.setPk_fiorg(pk_org);
|
|
|
+ receivableBillItemVO.setDef30("06");
|
|
|
+ receivableBillItemVO.setDef30(GetDataUtil.getDefdocPK("06", "05", "待摊费用"));
|
|
|
+ receivableBillItemVO.setDef26(GetDataUtil.getDefdocPK("S00009", "08", "代垫费用"));
|
|
|
+ receivableBillItemVO.setDef29(GetDataUtil.getDefdocPK("060501", "YS001", "不开票结算"));
|
|
|
+ receivableBillItemVO.setDef15(GetDataUtil.getDefdocPK("其他合同(财务专用)", "01", "其他合同(财务专用)"));
|
|
|
+ receivableBillItemVO.setDef16("其他合同(财务专用)");
|
|
|
+ receivableBillItemVO.setDef10(year + month + "公积金个人部分");
|
|
|
+ String code = getbd_cust_supplier_code(orgName);
|
|
|
+ receivableBillItemVO.setCustomer(GetDataUtil.getCustomerPK(code));
|
|
|
+ receivableBillItemVO.setOrdercubasdoc(GetDataUtil.getCustomerPK(code));
|
|
|
+ receivableBillItemVO.setTaxcodeid(GetDataUtil.getTaxcodePK("10"));
|
|
|
+ receivableBillItemVO.setTaxrate(new UFDouble(0));
|
|
|
+ receivableBillItemVO.setLocal_money_bal(debitamount);
|
|
|
+ receivableBillItemVO.setLocal_money_de(debitamount);
|
|
|
+ receivableBillItemVO.setLocal_notax_de(debitamount);
|
|
|
+ receivableBillItemVO.setLocal_tax_de(new UFDouble(0));
|
|
|
+ receivableBillItemVO.setLocal_price(debitamount);
|
|
|
+ receivableBillItemVO.setLocal_taxprice(debitamount);
|
|
|
+ receivableBillItemVO.setMoney_bal(debitamount);
|
|
|
+ receivableBillItemVO.setMoney_de(debitamount);
|
|
|
+ receivableBillItemVO.setNotax_de(debitamount);
|
|
|
+ receivableBillItemVO.setOccupationmny(debitamount);
|
|
|
+ receivableBillItemVO.setCaltaxmny(debitamount);
|
|
|
+ receivableBillItemVO.setPrice(debitamount);
|
|
|
+ receivableBillItemVO.setTaxprice(debitamount);
|
|
|
+ receivableBillItemVO.setBilldate(new UFDate());
|
|
|
+ receivableBillItemVO.setBusidate(new UFDate());
|
|
|
+ receivableBillItemVO.setPk_billtype("F0");
|
|
|
+ receivableBillItemVO.setBillclass("ys");
|
|
|
+ receivableBillItemVO.setRowno(rowNo);
|
|
|
+ receivableBillItemVO.setRowtype(22);
|
|
|
+ receivableBillItemVO.setDirection(1);
|
|
|
+ receivableBillItemVO.setPk_currtype(pk_currtype);
|
|
|
+ receivableBillItemVO.setTaxtype(1);
|
|
|
+ receivableBillItemVO.setObjtype(0);
|
|
|
+ receivableBillItemVO.setPk_balatype(GetDataUtil.getBalatypePK("12"));
|
|
|
+ receivableBillItemVO.setSendcountryid(pk_country);
|
|
|
+ receivableBillItemVO.setBuysellflag(1);
|
|
|
+
|
|
|
+ receivableBillItemVO.setPk_billtype("F0");
|
|
|
+ receivableBillItemVO.setPk_deptid(GetDataUtil.getDeptPK("000101205"));
|
|
|
+ receivableBillItemVO.setPk_deptid_v(GetDataUtil.getDeptPK("000101205"));
|
|
|
+ receivableBillItemVO.setPk_psndoc(GetDataUtil.getPsndocPK("1001A8100000003IHP1U"));
|
|
|
+
|
|
|
+ receivableBillItemVO.setPk_tradetype(pk_tradetype);
|
|
|
+ receivableBillItemVO.setPk_tradetypeid(pk_billtypeid);
|
|
|
+ receivableBillItemVO.setQuantity_bal(new UFDouble(1));
|
|
|
+ receivableBillItemVO.setQuantity_de(new UFDouble(1));
|
|
|
+ receivableBillItemVO.setRate(new UFDouble(1));
|
|
|
+ receivableBillItemVO.setRecaccount(pk_bankaccsub);
|
|
|
+ receivableBillItemVO.setRececountryid(pk_country);
|
|
|
+ receivableBillItemVO.setSett_org(pk_org);
|
|
|
+ receivableBillItemVO.setSett_org_v(pk_org);
|
|
|
+ receivableBillItemVO.setTriatradeflag(UFBoolean.FALSE);
|
|
|
+ receivableBillItemVO.setSettlecurr(pk_currtype);
|
|
|
+ receivableBillItemVO.setSettlemoney(debitamount);
|
|
|
+ listItemVO.add(receivableBillItemVO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ aggReceivableBillVO.setChildrenVO(listItemVO.toArray(new ReceivableBillItemVO[listItemVO.size()]));
|
|
|
+
|
|
|
+ IReceivableService receivableService = NCLocator.getInstance().lookup(IReceivableService.class);
|
|
|
+ AggReceivableBillVO aggvo = receivableService.receivable_RequiresNew(aggReceivableBillVO);
|
|
|
+ ReceivableBillVO headerVO = (ReceivableBillVO) aggvo.getParentVO();
|
|
|
+ billNO = headerVO.getBillno();
|
|
|
+ }
|
|
|
+ return billNO;
|
|
|
+ }
|
|
|
+
|
|
|
}
|