Commit 0c695aa3 authored by arawankar's avatar arawankar

Changes made in supplier.java

-Check supp_code__pay with length only without trim function
-Compare payto and suppcode with trim function
-comment pay_to validation because there is no such a column as pay_to in supplier master

Changes made in supplier21.xml and d_supplier_edit.srd
-uncheck required property for above fields supp code pay  and group code.

update trigger file for before insert and update on supplier table
-If key flag is 'A' then supp_code__pay set as blank then trigger will update the supp_code value in supp_code__pay field.
-group code is not null in database ,for this reason trigger will update supp_code value in group_code field.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184177 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 84f156f7
......@@ -237,9 +237,15 @@ public class Supplier extends ValidatorEJB implements SupplierLocal,SupplierRemo
System.out.println(">>>>>>>>>>>supp_code__pay validation:");
payTo = checkNull(genericUtility.getColumnValue("supp_code__pay", dom));
suppCode = checkNull(genericUtility.getColumnValue("supp_code", dom));
if(payTo != null && payTo.trim().length() > 0)
//Modified by Anjali R. on[26/04/2018][To check length without trim function][Start]
//if(payTo != null && payTo.trim().length() > 0)
if(payTo != null && payTo.length() > 0)
//Modified by Anjali R. on[26/04/2018][To check length without trim function][End]
{
if(!suppCode.equalsIgnoreCase(payTo))
//Modified by Anjali R. on[26/04/2018][To compare two strings with trim function][Start]
//if(!suppCode.equalsIgnoreCase(payTo))
if(!suppCode.trim().equalsIgnoreCase(payTo.trim()))
//Modified by Anjali R. on[26/04/2018][To compare two strings with trim function][End]
{
count = 0;
sql = "SELECT COUNT(1) FROM SUPPLIER WHERE SUPP_CODE = ?";
......@@ -267,7 +273,8 @@ public class Supplier extends ValidatorEJB implements SupplierLocal,SupplierRemo
}
}
}
else if(childNodeName.equalsIgnoreCase("pay_to"))
//Modified by Anjali R. on[26/04/2018][No such a column as "pay_to" in supplier master ][Start]
/*else if(childNodeName.equalsIgnoreCase("pay_to"))
{
System.out.println(">>>>>>>>>>pay_to validation:");
payTo = genericUtility.getColumnValue("pay_to", dom);
......@@ -289,7 +296,8 @@ public class Supplier extends ValidatorEJB implements SupplierLocal,SupplierRemo
errFields.add(childNodeName.toLowerCase());
}
}
}
}*/
//Modified by Anjali R. on[26/04/2018][No such a column as "pay_to" in supplier master ][End]
//Changed By Nasruddin 21-SEP-16 END
else if(childNodeName.equalsIgnoreCase("curr_code"))
......
......@@ -2010,7 +2010,6 @@
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<required>yes</required>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
......@@ -2077,7 +2076,6 @@
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<required>yes</required>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
......
CREATE OR REPLACE TRIGGER TRIG_SUPPLIER BEFORE
INSERT OR
UPDATE ON SUPPLIER FOR EACH ROW
BEGIN
:NEW.SUPP_CODE__PAY := CASE WHEN :NEW.SUPP_CODE__PAY IS NULL THEN :NEW.SUPP_CODE ELSE :NEW.SUPP_CODE__PAY END;
:NEW.GROUP_CODE := CASE WHEN :NEW.GROUP_CODE IS NULL THEN :NEW.SUPP_CODE ELSE :NEW.GROUP_CODE END;
END;
/
......@@ -147,9 +147,9 @@ column(band=detail id=13 alignment="0" tabsequence=140 border="5" color="0" x="5
column(band=detail id=14 alignment="0" tabsequence=32766 border="5" color="255" x="636" y="246" height="16" width="57" format="[general]" html.valueishtml="0" name=count_code visible="1" edit.limit=5 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
text(band=detail alignment="1" text="Contact :" border="0" color="0" x="287" y="16" height="16" width="296" html.valueishtml="0" name=contact_code_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
text(band=detail alignment="1" text="Group :" border="0" color="0" x="428" y="108" height="16" width="155" html.valueishtml="0" name=group_code_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=6 alignment="0" tabsequence=80 border="5" color="0" x="587" y="108" height="16" width="106" format="[general]" html.valueishtml="0" name=group_code visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.required=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=6 alignment="0" tabsequence=80 border="5" color="0" x="587" y="108" height="16" width="106" format="[general]" html.valueishtml="0" name=group_code visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Pay To :" border="0" color="0" x="17" y="107" height="16" width="155" html.valueishtml="0" name=pay_to_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=7 alignment="0" tabsequence=70 border="5" color="0" x="177" y="107" height="16" width="106" format="[general]" html.valueishtml="0" name=supp_code__pay visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.required=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=7 alignment="0" tabsequence=70 border="5" color="0" x="177" y="107" height="16" width="106" format="[general]" html.valueishtml="0" name=supp_code__pay visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Cheque Name :" border="0" color="0" x="17" y="291" height="16" width="155" html.valueishtml="0" name=chq_name_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=69 alignment="0" tabsequence=160 border="5" color="0" x="176" y="291" height="16" width="517" format="[general]" html.valueishtml="0" name=chq_name visible="1" edit.limit=160 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Bank Reference :" border="0" color="0" x="17" y="268" height="16" width="155" html.valueishtml="0" name=bank_ref_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
......
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