Commit d8931891 authored by asikarwar's avatar asikarwar

set item change same as header on unit__rate and item_code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92109 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bceef20f
...@@ -1108,7 +1108,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1108,7 +1108,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
else if (currentColumn.trim().equalsIgnoreCase("item_code")) else if (currentColumn.trim().equalsIgnoreCase("item_code"))
{ {
itemCode=checkNull(this.genericUtility.getColumnValue("item_code", dom)); itemCode=checkNull(this.genericUtility.getColumnValue("item_code", dom));
sql = "select descr ,item_ser ,unit ,unit__rate from item where item_code = ?"; sql = "select descr ,item_ser ,unit ,unit__pur,unit__rate from item where item_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -1117,7 +1117,8 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1117,7 +1117,8 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
descrItem = checkNull(rs.getString(1)); descrItem = checkNull(rs.getString(1));
itemSer = checkNull(rs.getString(2)); itemSer = checkNull(rs.getString(2));
unit = checkNull(rs.getString(3)); unit = checkNull(rs.getString(3));
unitRate = checkNull(rs.getString(4)); unitPur = rs.getString(4)== null?"":rs.getString(3);
unitRate = rs.getString(5)== null?"":rs.getString(3);
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -1127,11 +1128,13 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1127,11 +1128,13 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
valueXmlString.append("<item_descr>").append("<![CDATA["+descrItem+"]]>").append("</item_descr>"); valueXmlString.append("<item_descr>").append("<![CDATA["+descrItem+"]]>").append("</item_descr>");
valueXmlString.append("<item_ser>").append("<![CDATA["+itemSer+"]]>").append("</item_ser>"); valueXmlString.append("<item_ser>").append("<![CDATA["+itemSer+"]]>").append("</item_ser>");
valueXmlString.append("<unit>").append("<![CDATA["+unit+"]]>").append("</unit>"); valueXmlString.append("<unit>").append("<![CDATA["+unit+"]]>").append("</unit>");
valueXmlString.append("<unit__std >").append("<![CDATA["+unit+"]]>").append("</unit__std>");
valueXmlString.append("<unit__rate>").append("<![CDATA["+unitRate+"]]>").append("</unit__rate>"); valueXmlString.append("<unit__rate>").append("<![CDATA["+unitRate+"]]>").append("</unit__rate>");
} }
else if (childNodeName.trim().equalsIgnoreCase("unit__rate")) else if (childNodeName.trim().equalsIgnoreCase("unit__rate"))
{ {
System.out.println("unit__rate ITEM CHANGE =");
unitRate=checkNull(this.genericUtility.getColumnValue("unit__rate", dom)); unitRate=checkNull(this.genericUtility.getColumnValue("unit__rate", dom));
quantity=checkDoubleNull(this.genericUtility.getColumnValue("quantity", dom)); quantity=checkDoubleNull(this.genericUtility.getColumnValue("quantity", dom));
unit=checkNull(this.genericUtility.getColumnValue("unit", dom)); unit=checkNull(this.genericUtility.getColumnValue("unit", dom));
...@@ -1141,6 +1144,8 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1141,6 +1144,8 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
{ {
valueXmlString.append("<conv__qty_stduom >").append("<![CDATA["+1+"]]>").append("</conv__qty_stduom>"); valueXmlString.append("<conv__qty_stduom >").append("<![CDATA["+1+"]]>").append("</conv__qty_stduom>");
valueXmlString.append("<conv__rate_stduom >").append("<![CDATA["+1+"]]>").append("</conv__rate_stduom>"); valueXmlString.append("<conv__rate_stduom >").append("<![CDATA["+1+"]]>").append("</conv__rate_stduom>");
valueXmlString.append("<rate__stduom >").append("<![CDATA["+quantity+"]]>").append("</rate__stduom>");
valueXmlString.append("<quantity__stduom >").append("<![CDATA["+rate+"]]>").append("</quantity__stduom>");
} }
else else
{ {
...@@ -1180,6 +1185,45 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1180,6 +1185,45 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
amount = quantity*rate; amount = quantity*rate;
System.out.println("amountsssssssss"+quantity+""+rate+""+stdExrt+""+amount+""+amountBc); System.out.println("amountsssssssss"+quantity+""+rate+""+stdExrt+""+amount+""+amountBc);
valueXmlString.append("<amount>").append("<![CDATA["+amount+"]]>").append("</amount>"); valueXmlString.append("<amount>").append("<![CDATA["+amount+"]]>").append("</amount>");
unitRate=checkNull(this.genericUtility.getColumnValue("unit__rate", dom));
unit=checkNull(this.genericUtility.getColumnValue("unit", dom));
itemCode=checkNull(this.genericUtility.getColumnValue("item_code", dom));
if(unitRate.equalsIgnoreCase(unit))
{
valueXmlString.append("<conv__qty_stduom >").append("<![CDATA["+1+"]]>").append("</conv__qty_stduom>");
valueXmlString.append("<conv__rate_stduom >").append("<![CDATA["+1+"]]>").append("</conv__rate_stduom>");
}
else
{
System.out.print("unit unitStd itemCode quantity"+unit+""+unitStd+""+quantity);
ArrayList convQtyList = distCommon.getConvQuantityFact(unit, unitRate, itemCode, quantity, 0, conn);
System.out.println("convQtyList = "+convQtyList);
convQtuomStduom = Double.parseDouble(convQtyList.get(0).toString());
System.out.println("meffQty ["+convQtuomStduom+"]");
quantityStduom = Double.parseDouble(convQtyList.get(1).toString());
System.out.println("meffQty ["+quantityStduom+"]");
valueXmlString.append("<conv__qty_stduom >").append("<![CDATA["+convQtuomStduom+"]]>").append("</conv__qty_stduom>");
valueXmlString.append("<rate__stduom >").append("<![CDATA["+quantityStduom+"]]>").append("</rate__stduom>");
ArrayList convRateList = distCommon.getConvQuantityFact(unit, unitRate, itemCode, rate, 0, conn);
System.out.println("convRateList = "+convRateList);
convQtuomStduom = Double.parseDouble(convRateList.get(0).toString());
System.out.println("meffQty ["+convQtuomStduom+"]");
rateStduom = Double.parseDouble(convRateList.get(1).toString());
System.out.println("meffQty ["+quantityStduom+"]");
valueXmlString.append("<conv__rate_stduom >").append("<![CDATA["+convQtuomStduom+"]]>").append("</conv__rate_stduom>");
valueXmlString.append("<quantity__stduom >").append("<![CDATA["+rateStduom+"]]>").append("</quantity__stduom>");
}
} }
else if (currentColumn.trim().equalsIgnoreCase("pack_code")) else if (currentColumn.trim().equalsIgnoreCase("pack_code"))
......
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