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_InvoiceSchedule extends PO 11 { 12 13 public X_C_InvoiceSchedule (Properties ctx, int C_InvoiceSchedule_ID) 14 { 15 super (ctx, C_InvoiceSchedule_ID); 16 28 } 29 30 public X_C_InvoiceSchedule (Properties ctx, ResultSet rs) 31 { 32 super (ctx, rs); 33 } 34 35 protected POInfo initPO (Properties ctx) 36 { 37 int AD_Table_ID = 257; 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_InvoiceSchedule[").append(getID()).append("]"); 44 return sb.toString(); 45 } 46 public void setAmt (BigDecimal Amt) 47 { 48 if (Amt == null) throw new IllegalArgumentException ("Amt is mandatory"); 49 setValue ("Amt", Amt); 50 } 51 public BigDecimal getAmt() 52 { 53 BigDecimal bd = (BigDecimal)getValue("Amt"); 54 if (bd == null) return Env.ZERO; 55 return bd; 56 } 57 void setC_InvoiceSchedule_ID (int C_InvoiceSchedule_ID) 58 { 59 setValueNoCheck ("C_InvoiceSchedule_ID", new Integer (C_InvoiceSchedule_ID)); 60 } 61 public int getC_InvoiceSchedule_ID() 62 { 63 Integer ii = (Integer )getValue("C_InvoiceSchedule_ID"); 64 if (ii == null) return 0; 65 return ii.intValue(); 66 } 67 public void setDescription (String Description) 68 { 69 setValue ("Description", Description); 70 } 71 public String getDescription() 72 { 73 return (String )getValue("Description"); 74 } 75 public void setEvenInvoiceWeek (boolean EvenInvoiceWeek) 76 { 77 setValue ("EvenInvoiceWeek", new Boolean (EvenInvoiceWeek)); 78 } 79 public boolean isEvenInvoiceWeek() 80 { 81 Boolean bb = (Boolean )getValue("EvenInvoiceWeek"); 82 if (bb != null) return bb.booleanValue(); 83 return false; 84 } 85 public void setInvoiceDay (int InvoiceDay) 86 { 87 setValue ("InvoiceDay", new Integer (InvoiceDay)); 88 } 89 public int getInvoiceDay() 90 { 91 Integer ii = (Integer )getValue("InvoiceDay"); 92 if (ii == null) return 0; 93 return ii.intValue(); 94 } 95 public void setInvoiceDayCutoff (int InvoiceDayCutoff) 96 { 97 setValue ("InvoiceDayCutoff", new Integer (InvoiceDayCutoff)); 98 } 99 public int getInvoiceDayCutoff() 100 { 101 Integer ii = (Integer )getValue("InvoiceDayCutoff"); 102 if (ii == null) return 0; 103 return ii.intValue(); 104 } 105 public static final String INVOICEFREQUENCY_Daily = "D"; 106 public static final String INVOICEFREQUENCY_Weekly = "W"; 107 public static final String INVOICEFREQUENCY_Monthly = "M"; 108 public static final String INVOICEFREQUENCY_TwiceMonthly = "T"; 109 public void setInvoiceFrequency (String InvoiceFrequency) 110 { 111 if (InvoiceFrequency.equals("D") || InvoiceFrequency.equals("W") || InvoiceFrequency.equals("M") || InvoiceFrequency.equals("T")); 112 else throw new IllegalArgumentException ("InvoiceFrequency Invalid value - Reference_ID=168 - D - W - M - T"); 113 if (InvoiceFrequency == null) throw new IllegalArgumentException ("InvoiceFrequency is mandatory"); 114 setValue ("InvoiceFrequency", InvoiceFrequency); 115 } 116 public String getInvoiceFrequency() 117 { 118 return (String )getValue("InvoiceFrequency"); 119 } 120 public static final String INVOICEWEEKDAY_Sunday = "7"; 121 public static final String INVOICEWEEKDAY_Monday = "1"; 122 public static final String INVOICEWEEKDAY_Tuesday = "2"; 123 public static final String INVOICEWEEKDAY_Wednesday = "3"; 124 public static final String INVOICEWEEKDAY_Thursday = "4"; 125 public static final String INVOICEWEEKDAY_Friday = "5"; 126 public static final String INVOICEWEEKDAY_Saturday = "6"; 127 public void setInvoiceWeekDay (String InvoiceWeekDay) 128 { 129 if (InvoiceWeekDay.equals("7") || InvoiceWeekDay.equals("1") || InvoiceWeekDay.equals("2") || InvoiceWeekDay.equals("3") || InvoiceWeekDay.equals("4") || InvoiceWeekDay.equals("5") || InvoiceWeekDay.equals("6")); 130 else throw new IllegalArgumentException ("InvoiceWeekDay Invalid value - Reference_ID=167 - 7 - 1 - 2 - 3 - 4 - 5 - 6"); 131 if (InvoiceWeekDay == null) throw new IllegalArgumentException ("InvoiceWeekDay is mandatory"); 132 setValue ("InvoiceWeekDay", InvoiceWeekDay); 133 } 134 public String getInvoiceWeekDay() 135 { 136 return (String )getValue("InvoiceWeekDay"); 137 } 138 public static final String INVOICEWEEKDAYCUTOFF_Sunday = "7"; 139 public static final String INVOICEWEEKDAYCUTOFF_Monday = "1"; 140 public static final String INVOICEWEEKDAYCUTOFF_Tuesday = "2"; 141 public static final String INVOICEWEEKDAYCUTOFF_Wednesday = "3"; 142 public static final String INVOICEWEEKDAYCUTOFF_Thursday = "4"; 143 public static final String INVOICEWEEKDAYCUTOFF_Friday = "5"; 144 public static final String INVOICEWEEKDAYCUTOFF_Saturday = "6"; 145 public void setInvoiceWeekDayCutoff (String InvoiceWeekDayCutoff) 146 { 147 if (InvoiceWeekDayCutoff.equals("7") || InvoiceWeekDayCutoff.equals("1") || InvoiceWeekDayCutoff.equals("2") || InvoiceWeekDayCutoff.equals("3") || InvoiceWeekDayCutoff.equals("4") || InvoiceWeekDayCutoff.equals("5") || InvoiceWeekDayCutoff.equals("6")); 148 else throw new IllegalArgumentException ("InvoiceWeekDayCutoff Invalid value - Reference_ID=167 - 7 - 1 - 2 - 3 - 4 - 5 - 6"); 149 setValue ("InvoiceWeekDayCutoff", InvoiceWeekDayCutoff); 150 } 151 public String getInvoiceWeekDayCutoff() 152 { 153 return (String )getValue("InvoiceWeekDayCutoff"); 154 } 155 public void setIsAmount (boolean IsAmount) 156 { 157 setValue ("IsAmount", new Boolean (IsAmount)); 158 } 159 public boolean isAmount() 160 { 161 Boolean bb = (Boolean )getValue("IsAmount"); 162 if (bb != null) return bb.booleanValue(); 163 return false; 164 } 165 public void setIsDefault (boolean IsDefault) 166 { 167 setValue ("IsDefault", new Boolean (IsDefault)); 168 } 169 public boolean isDefault() 170 { 171 Boolean bb = (Boolean )getValue("IsDefault"); 172 if (bb != null) return bb.booleanValue(); 173 return false; 174 } 175 public void setName (String Name) 176 { 177 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 178 setValue ("Name", Name); 179 } 180 public String getName() 181 { 182 return (String )getValue("Name"); 183 } 184 } 185 | Popular Tags |