1 2 package org.compiere.model; 3 import java.util.*; 4 import java.sql.*; 5 import java.math.*; 6 import java.io.Serializable ; 7 import org.compiere.util.*; 8 10 public class X_C_PaySchedule extends PO 11 { 12 13 public X_C_PaySchedule (Properties ctx, int C_PaySchedule_ID) 14 { 15 super (ctx, C_PaySchedule_ID); 16 28 } 29 30 public X_C_PaySchedule (Properties ctx, ResultSet rs) 31 { 32 super (ctx, rs); 33 } 34 35 protected POInfo initPO (Properties ctx) 36 { 37 int AD_Table_ID = 548; 38 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 39 return poi; 40 } 41 public String toString() 42 { 43 StringBuffer sb = new StringBuffer ("X_C_PaySchedule[").append(getID()).append("]"); 44 return sb.toString(); 45 } 46 void setC_PaySchedule_ID (int C_PaySchedule_ID) 47 { 48 setValueNoCheck ("C_PaySchedule_ID", new Integer (C_PaySchedule_ID)); 49 } 50 public int getC_PaySchedule_ID() 51 { 52 Integer ii = (Integer )getValue("C_PaySchedule_ID"); 53 if (ii == null) return 0; 54 return ii.intValue(); 55 } 56 void setC_PaymentTerm_ID (int C_PaymentTerm_ID) 57 { 58 setValueNoCheck ("C_PaymentTerm_ID", new Integer (C_PaymentTerm_ID)); 59 } 60 public int getC_PaymentTerm_ID() 61 { 62 Integer ii = (Integer )getValue("C_PaymentTerm_ID"); 63 if (ii == null) return 0; 64 return ii.intValue(); 65 } 66 public void setDiscount (BigDecimal Discount) 67 { 68 if (Discount == null) throw new IllegalArgumentException ("Discount is mandatory"); 69 setValue ("Discount", Discount); 70 } 71 public BigDecimal getDiscount() 72 { 73 BigDecimal bd = (BigDecimal)getValue("Discount"); 74 if (bd == null) return Env.ZERO; 75 return bd; 76 } 77 public void setDiscountDays (int DiscountDays) 78 { 79 setValue ("DiscountDays", new Integer (DiscountDays)); 80 } 81 public int getDiscountDays() 82 { 83 Integer ii = (Integer )getValue("DiscountDays"); 84 if (ii == null) return 0; 85 return ii.intValue(); 86 } 87 public void setGraceDays (int GraceDays) 88 { 89 setValue ("GraceDays", new Integer (GraceDays)); 90 } 91 public int getGraceDays() 92 { 93 Integer ii = (Integer )getValue("GraceDays"); 94 if (ii == null) return 0; 95 return ii.intValue(); 96 } 97 public void setIsValid (boolean IsValid) 98 { 99 setValue ("IsValid", new Boolean (IsValid)); 100 } 101 public boolean isValid() 102 { 103 Boolean bb = (Boolean )getValue("IsValid"); 104 if (bb != null) return bb.booleanValue(); 105 return false; 106 } 107 public static final String NETDAY_Sunday = "7"; 108 public static final String NETDAY_Monday = "1"; 109 public static final String NETDAY_Tuesday = "2"; 110 public static final String NETDAY_Wednesday = "3"; 111 public static final String NETDAY_Thursday = "4"; 112 public static final String NETDAY_Friday = "5"; 113 public static final String NETDAY_Saturday = "6"; 114 public void setNetDay (String NetDay) 115 { 116 if (NetDay.equals("7") || NetDay.equals("1") || NetDay.equals("2") || NetDay.equals("3") || NetDay.equals("4") || NetDay.equals("5") || NetDay.equals("6")); 117 else throw new IllegalArgumentException ("NetDay Invalid value - Reference_ID=167 - 7 - 1 - 2 - 3 - 4 - 5 - 6"); 118 setValue ("NetDay", NetDay); 119 } 120 public String getNetDay() 121 { 122 return (String )getValue("NetDay"); 123 } 124 public void setNetDays (int NetDays) 125 { 126 setValue ("NetDays", new Integer (NetDays)); 127 } 128 public int getNetDays() 129 { 130 Integer ii = (Integer )getValue("NetDays"); 131 if (ii == null) return 0; 132 return ii.intValue(); 133 } 134 public void setPercentage (BigDecimal Percentage) 135 { 136 if (Percentage == null) throw new IllegalArgumentException ("Percentage is mandatory"); 137 setValue ("Percentage", Percentage); 138 } 139 public BigDecimal getPercentage() 140 { 141 BigDecimal bd = (BigDecimal)getValue("Percentage"); 142 if (bd == null) return Env.ZERO; 143 return bd; 144 } 145 } 146
| Popular Tags
|