Browse Source

电子发票(航空运输电子客票行程单)类型处理

yaoyu 4 months ago
parent
commit
4a55a03fda

+ 10 - 0
pu/pu/src/client/nc/pub/filesystem/newui/ThOCRAction.java

@@ -14,6 +14,8 @@ import java.util.UUID;
 import javax.swing.AbstractAction;
 import javax.swing.Action;
 import nc.vo.pub.filesystem.NCFileVO;
+import nc.vo.pub.lang.UFDouble;
+
 import org.apache.commons.httpclient.HttpException;
 
 import com.alibaba.fastjson.JSONArray;
@@ -235,6 +237,14 @@ public class ThOCRAction extends AbstractNCAction{
 					amount = price.getString("amount");//无税金额
 					ttax = extobj.getString("ttax");//税额
 				}
+				
+				if("电子发票(航空运输电子客票行程单)".equals(cname)) {
+					UFDouble fuel_surcharge = new UFDouble(extobj.get("fuel_surcharge") == null ? 0.00 : Double.valueOf(extobj.get("fuel_surcharge").toString()),2);//燃油附加费
+					UFDouble caac_development_fund =  new UFDouble(extobj.get("caac_development_fund") == null ? 0.00 : Double.valueOf(extobj.get("caac_development_fund").toString()),2);//民航发展基金
+					UFDouble norigmnys = new UFDouble(amount ==  null ? 0.00 : Double.parseDouble(amount),2);//发票无税金额
+					norigmnys = norigmnys.add(fuel_surcharge).add(caac_development_fund);
+					amount = norigmnys.toString();
+				}
 				JSONObject buyer = comm_info.getJSONObject("buyer");
 				String mnecode = buyer.getString("tcode");//购买方纳税人识别号
 				String name2 = buyer.getString("company");//购买方公司名称

+ 9 - 0
pu/pu/src/client/nc/ui/pubapp/uif2app/actions/MultiSelectDialog.java

@@ -223,6 +223,14 @@ public class MultiSelectDialog extends UIDialog {
 					UFDouble norigtaxmnys = new UFDouble(total ==  null ? 0.00 : Double.parseDouble(total),2);//发票价税合计
 					UFDouble norigmnys = new UFDouble(amount ==  null ? 0.00 : Double.parseDouble(amount),2);//发票无税金额
 					UFDouble ntaxs = new UFDouble(ttax ==  null ? 0.00 : Double.parseDouble(ttax),2);//发票税额
+					
+					if("电子发票(航空运输电子客票行程单)".equals(cname)) {
+						UFDouble fuel_surcharge = new UFDouble(extobj.get("fuel_surcharge") == null ? 0.00 : Double.valueOf(extobj.get("fuel_surcharge").toString()),2);//燃油附加费
+						UFDouble caac_development_fund =  new UFDouble(extobj.get("caac_development_fund") == null ? 0.00 : Double.valueOf(extobj.get("caac_development_fund").toString()),2);//民航发展基金
+						norigmnys = norigmnys.add(fuel_surcharge).add(caac_development_fund);
+						amount = norigmnys.toString();
+					}
+					
 					DefdocVO defvo = new DefdocVO();
 					long l = System.currentTimeMillis();
 					//发票可以重复获取,避免自定义档案保存保存,加上时间戳保证唯一
@@ -256,6 +264,7 @@ public class MultiSelectDialog extends UIDialog {
 					Boolean blen = QryOCRNumber(code, "1")  == null ? false : true;
 					String url = noauth+furl+"&fid="+fid;
 					String link = "<html><a href="+url+">"+name+"</a></html>";
+					//可用无税金额norigmnys.sub(norigmny)  无税金额amount
 					Object[] obj = {blen,cname,norigtaxmnys.sub(norigtaxmny),norigmnys.sub(norigmny),ntaxs.sub(ntax),total,amount,trate
 							,ttax,dtax,codenumber,memo,link,mnecode,name2,name3,name4,kind,date,code};
 					dataList.add(obj);