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_PaymentTerm extends PO 11 { 12 13 public X_C_PaymentTerm (Properties ctx, int C_PaymentTerm_ID) 14 { 15 super (ctx, C_PaymentTerm_ID); 16 32 } 33 34 public X_C_PaymentTerm (Properties ctx, ResultSet rs) 35 { 36 super (ctx, rs); 37 } 38 39 protected POInfo initPO (Properties ctx) 40 { 41 int AD_Table_ID = 113; 42 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 43 return poi; 44 } 45 public String toString() 46 { 47 StringBuffer sb = new StringBuffer ("X_C_PaymentTerm[").append(getID()).append("]"); 48 return sb.toString(); 49 } 50 public void setAfterDelivery (boolean AfterDelivery) 51 { 52 setValue ("AfterDelivery", new Boolean (AfterDelivery)); 53 } 54 public boolean isAfterDelivery() 55 { 56 Boolean bb = (Boolean )getValue("AfterDelivery"); 57 if (bb != null) return bb.booleanValue(); 58 return false; 59 } 60 void setC_PaymentTerm_ID (int C_PaymentTerm_ID) 61 { 62 setValueNoCheck ("C_PaymentTerm_ID", new Integer (C_PaymentTerm_ID)); 63 } 64 public int getC_PaymentTerm_ID() 65 { 66 Integer ii = (Integer )getValue("C_PaymentTerm_ID"); 67 if (ii == null) return 0; 68 return ii.intValue(); 69 } 70 public void setDescription (String Description) 71 { 72 setValue ("Description", Description); 73 } 74 public String getDescription() 75 { 76 return (String )getValue("Description"); 77 } 78 public void setDiscount (BigDecimal Discount) 79 { 80 if (Discount == null) throw new IllegalArgumentException ("Discount is mandatory"); 81 setValue ("Discount", Discount); 82 } 83 public BigDecimal getDiscount() 84 { 85 BigDecimal bd = (BigDecimal)getValue("Discount"); 86 if (bd == null) return Env.ZERO; 87 return bd; 88 } 89 public void setDiscount2 (BigDecimal Discount2) 90 { 91 if (Discount2 == null) throw new IllegalArgumentException ("Discount2 is mandatory"); 92 setValue ("Discount2", Discount2); 93 } 94 public BigDecimal getDiscount2() 95 { 96 BigDecimal bd = (BigDecimal)getValue("Discount2"); 97 if (bd == null) return Env.ZERO; 98 return bd; 99 } 100 public void setDiscountDays (int DiscountDays) 101 { 102 setValue ("DiscountDays", new Integer (DiscountDays)); 103 } 104 public int getDiscountDays() 105 { 106 Integer ii = (Integer )getValue("DiscountDays"); 107 if (ii == null) return 0; 108 return ii.intValue(); 109 } 110 public void setDiscountDays2 (int DiscountDays2) 111 { 112 setValue ("DiscountDays2", new Integer (DiscountDays2)); 113 } 114 public int getDiscountDays2() 115 { 116 Integer ii = (Integer )getValue("DiscountDays2"); 117 if (ii == null) return 0; 118 return ii.intValue(); 119 } 120 public void setDocumentNote (String DocumentNote) 121 { 122 setValue ("DocumentNote", DocumentNote); 123 } 124 public String getDocumentNote() 125 { 126 return (String )getValue("DocumentNote"); 127 } 128 public void setFixMonthCutoff (int FixMonthCutoff) 129 { 130 setValue ("FixMonthCutoff", new Integer (FixMonthCutoff)); 131 } 132 public int getFixMonthCutoff() 133 { 134 Integer ii = (Integer )getValue("FixMonthCutoff"); 135 if (ii == null) return 0; 136 return ii.intValue(); 137 } 138 public void setFixMonthDay (int FixMonthDay) 139 { 140 setValue ("FixMonthDay", new Integer (FixMonthDay)); 141 } 142 public int getFixMonthDay() 143 { 144 Integer ii = (Integer )getValue("FixMonthDay"); 145 if (ii == null) return 0; 146 return ii.intValue(); 147 } 148 public void setFixMonthOffset (int FixMonthOffset) 149 { 150 setValue ("FixMonthOffset", new Integer (FixMonthOffset)); 151 } 152 public int getFixMonthOffset() 153 { 154 Integer ii = (Integer )getValue("FixMonthOffset"); 155 if (ii == null) return 0; 156 return ii.intValue(); 157 } 158 public void setGraceDays (int GraceDays) 159 { 160 setValue ("GraceDays", new Integer (GraceDays)); 161 } 162 public int getGraceDays() 163 { 164 Integer ii = (Integer )getValue("GraceDays"); 165 if (ii == null) return 0; 166 return ii.intValue(); 167 } 168 public void setIsDefault (boolean IsDefault) 169 { 170 setValue ("IsDefault", new Boolean (IsDefault)); 171 } 172 public boolean isDefault() 173 { 174 Boolean bb = (Boolean )getValue("IsDefault"); 175 if (bb != null) return bb.booleanValue(); 176 return false; 177 } 178 public void setIsDueFixed (boolean IsDueFixed) 179 { 180 setValue ("IsDueFixed", new Boolean (IsDueFixed)); 181 } 182 public boolean isDueFixed() 183 { 184 Boolean bb = (Boolean )getValue("IsDueFixed"); 185 if (bb != null) return bb.booleanValue(); 186 return false; 187 } 188 public void setIsNextBusinessDay (boolean IsNextBusinessDay) 189 { 190 setValue ("IsNextBusinessDay", new Boolean (IsNextBusinessDay)); 191 } 192 public boolean isNextBusinessDay() 193 { 194 Boolean bb = (Boolean )getValue("IsNextBusinessDay"); 195 if (bb != null) return bb.booleanValue(); 196 return false; 197 } 198 public void setIsValid (boolean IsValid) 199 { 200 setValue ("IsValid", new Boolean (IsValid)); 201 } 202 public boolean isValid() 203 { 204 Boolean bb = (Boolean )getValue("IsValid"); 205 if (bb != null) return bb.booleanValue(); 206 return false; 207 } 208 public void setName (String Name) 209 { 210 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 211 setValue ("Name", Name); 212 } 213 public String getName() 214 { 215 return (String )getValue("Name"); 216 } 217 public static final String NETDAY_Sunday = "7"; 218 public static final String NETDAY_Monday = "1"; 219 public static final String NETDAY_Tuesday = "2"; 220 public static final String NETDAY_Wednesday = "3"; 221 public static final String NETDAY_Thursday = "4"; 222 public static final String NETDAY_Friday = "5"; 223 public static final String NETDAY_Saturday = "6"; 224 public void setNetDay (String NetDay) 225 { 226 if (NetDay.equals("7") || NetDay.equals("1") || NetDay.equals("2") || NetDay.equals("3") || NetDay.equals("4") || NetDay.equals("5") || NetDay.equals("6")); 227 else throw new IllegalArgumentException ("NetDay Invalid value - Reference_ID=167 - 7 - 1 - 2 - 3 - 4 - 5 - 6"); 228 setValue ("NetDay", NetDay); 229 } 230 public String getNetDay() 231 { 232 return (String )getValue("NetDay"); 233 } 234 public void setNetDays (int NetDays) 235 { 236 setValue ("NetDays", new Integer (NetDays)); 237 } 238 public int getNetDays() 239 { 240 Integer ii = (Integer )getValue("NetDays"); 241 if (ii == null) return 0; 242 return ii.intValue(); 243 } 244 public void setValue (String Value) 245 { 246 if (Value == null) throw new IllegalArgumentException ("Value is mandatory"); 247 setValue ("Value", Value); 248 } 249 public String getValue() 250 { 251 return (String )getValue("Value"); 252 } 253 } 254
| Popular Tags
|