Commit d87e7454 by liuyang

2024-09-10 采购发票录入发票总金额,系统自动核销采购收货明细,按照相同供应商、从最早日期往后自动核销

parent e1c668ad
...@@ -157,6 +157,9 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -157,6 +157,9 @@ public class ServiceHGCW012 extends ServiceBase {
BigDecimal thisSettlementTax = BigDecimal.ZERO; // 计算 税额 BigDecimal thisSettlementTax = BigDecimal.ZERO; // 计算 税额
// 发票金额大于货物金额 // 发票金额大于货物金额
if (totalContractPriceIncluding.compareTo(amount) >= 0){ if (totalContractPriceIncluding.compareTo(amount) >= 0){
if (totalContractPriceIncluding.compareTo(amount) == 0){
flag = false;
}
totalContractPriceIncluding = totalContractPriceIncluding.subtract(amount); totalContractPriceIncluding = totalContractPriceIncluding.subtract(amount);
thisSettlementAmount = amount.divide(taxRateAsDecimal, 3, RoundingMode.HALF_UP); //不含税金额 thisSettlementAmount = amount.divide(taxRateAsDecimal, 3, RoundingMode.HALF_UP); //不含税金额
thisSettlementTax = amount.subtract(thisSettlementAmount); // 计算 税额 thisSettlementTax = amount.subtract(thisSettlementAmount); // 计算 税额
...@@ -165,9 +168,6 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -165,9 +168,6 @@ public class ServiceHGCW012 extends ServiceBase {
hgcg003B.setCancelAmount(c); hgcg003B.setCancelAmount(c);
hgcg003B.setUnCancelAmount(BigDecimal.ZERO); hgcg003B.setUnCancelAmount(BigDecimal.ZERO);
hgcg003B.setIsInvoicing(HGConstant.CgIsInvoicing.S_1); hgcg003B.setIsInvoicing(HGConstant.CgIsInvoicing.S_1);
if (totalContractPriceIncluding.compareTo(amount) == 0){
flag = false;
}
}else { }else {
thisSettlementAmount = totalContractPriceIncluding.divide(taxRateAsDecimal, 3, RoundingMode.HALF_UP); //不含税金额 thisSettlementAmount = totalContractPriceIncluding.divide(taxRateAsDecimal, 3, RoundingMode.HALF_UP); //不含税金额
thisSettlementTax = totalContractPriceIncluding.subtract(thisSettlementAmount); // 计算 税额 thisSettlementTax = totalContractPriceIncluding.subtract(thisSettlementAmount); // 计算 税额
......
...@@ -39,20 +39,20 @@ ...@@ -39,20 +39,20 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="210" required="true" maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id" <EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="210" required="true" maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id" <EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="210" required="true" maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<%--<EF:EFColumn ename="partyA" cname="供应商名称" width="220" enable="false" readonly="true" align="center"/>--%> <%--<EF:EFColumn ename="partyA" cname="供应商名称" width="220" enable="false" readonly="true" align="center"/>--%>
...@@ -70,15 +70,15 @@ ...@@ -70,15 +70,15 @@
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" > columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/> <EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" enable="true" format="{0:C3}" editType="text" <EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" format="{0:C3}" editType="text" <EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" format="{0:C3}" editType="text" <EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<%--<EF:EFColumn ename="partyA" cname="供应商名称" width="120" enable="false" readonly="true" align="center"/>--%> <%--<EF:EFColumn ename="partyA" cname="供应商名称" width="120" enable="false" readonly="true" align="center"/>--%>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:C3}" align="right" enable="false" readonly="true"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:N3}" align="right" enable="false" readonly="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
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 to comment