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_Tax extends PO 11 { 12 13 public X_C_Tax (Properties ctx, int C_Tax_ID) 14 { 15 super (ctx, C_Tax_ID); 16 31 } 32 33 public X_C_Tax (Properties ctx, ResultSet rs) 34 { 35 super (ctx, rs); 36 } 37 38 protected POInfo initPO (Properties ctx) 39 { 40 int AD_Table_ID = 261; 41 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 42 return poi; 43 } 44 public String toString() 45 { 46 StringBuffer sb = new StringBuffer ("X_C_Tax[").append(getID()).append("]"); 47 return sb.toString(); 48 } 49 public void setC_Country_ID (int C_Country_ID) 50 { 51 if (C_Country_ID == 0) setValue ("C_Country_ID", null); 52 else 53 setValue ("C_Country_ID", new Integer (C_Country_ID)); 54 } 55 public int getC_Country_ID() 56 { 57 Integer ii = (Integer )getValue("C_Country_ID"); 58 if (ii == null) return 0; 59 return ii.intValue(); 60 } 61 public void setC_Region_ID (int C_Region_ID) 62 { 63 if (C_Region_ID == 0) setValue ("C_Region_ID", null); 64 else 65 setValue ("C_Region_ID", new Integer (C_Region_ID)); 66 } 67 public int getC_Region_ID() 68 { 69 Integer ii = (Integer )getValue("C_Region_ID"); 70 if (ii == null) return 0; 71 return ii.intValue(); 72 } 73 public void setC_TaxCategory_ID (int C_TaxCategory_ID) 74 { 75 setValue ("C_TaxCategory_ID", new Integer (C_TaxCategory_ID)); 76 } 77 public int getC_TaxCategory_ID() 78 { 79 Integer ii = (Integer )getValue("C_TaxCategory_ID"); 80 if (ii == null) return 0; 81 return ii.intValue(); 82 } 83 void setC_Tax_ID (int C_Tax_ID) 84 { 85 setValueNoCheck ("C_Tax_ID", new Integer (C_Tax_ID)); 86 } 87 public int getC_Tax_ID() 88 { 89 Integer ii = (Integer )getValue("C_Tax_ID"); 90 if (ii == null) return 0; 91 return ii.intValue(); 92 } 93 public void setDescription (String Description) 94 { 95 setValue ("Description", Description); 96 } 97 public String getDescription() 98 { 99 return (String )getValue("Description"); 100 } 101 public void setIsDefault (boolean IsDefault) 102 { 103 setValue ("IsDefault", new Boolean (IsDefault)); 104 } 105 public boolean isDefault() 106 { 107 Boolean bb = (Boolean )getValue("IsDefault"); 108 if (bb != null) return bb.booleanValue(); 109 return false; 110 } 111 public void setIsDocumentLevel (boolean IsDocumentLevel) 112 { 113 setValue ("IsDocumentLevel", new Boolean (IsDocumentLevel)); 114 } 115 public boolean isDocumentLevel() 116 { 117 Boolean bb = (Boolean )getValue("IsDocumentLevel"); 118 if (bb != null) return bb.booleanValue(); 119 return false; 120 } 121 public void setIsSummary (boolean IsSummary) 122 { 123 setValue ("IsSummary", new Boolean (IsSummary)); 124 } 125 public boolean isSummary() 126 { 127 Boolean bb = (Boolean )getValue("IsSummary"); 128 if (bb != null) return bb.booleanValue(); 129 return false; 130 } 131 public void setIsTaxExempt (boolean IsTaxExempt) 132 { 133 setValue ("IsTaxExempt", new Boolean (IsTaxExempt)); 134 } 135 public boolean isTaxExempt() 136 { 137 Boolean bb = (Boolean )getValue("IsTaxExempt"); 138 if (bb != null) return bb.booleanValue(); 139 return false; 140 } 141 public void setName (String Name) 142 { 143 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 144 setValue ("Name", Name); 145 } 146 public String getName() 147 { 148 return (String )getValue("Name"); 149 } 150 public void setParent_Tax_ID (int Parent_Tax_ID) 151 { 152 if (Parent_Tax_ID == 0) setValue ("Parent_Tax_ID", null); 153 else 154 setValue ("Parent_Tax_ID", new Integer (Parent_Tax_ID)); 155 } 156 public int getParent_Tax_ID() 157 { 158 Integer ii = (Integer )getValue("Parent_Tax_ID"); 159 if (ii == null) return 0; 160 return ii.intValue(); 161 } 162 public void setRate (BigDecimal Rate) 163 { 164 if (Rate == null) throw new IllegalArgumentException ("Rate is mandatory"); 165 setValue ("Rate", Rate); 166 } 167 public BigDecimal getRate() 168 { 169 BigDecimal bd = (BigDecimal)getValue("Rate"); 170 if (bd == null) return Env.ZERO; 171 return bd; 172 } 173 public void setRequiresTaxCertificate (boolean RequiresTaxCertificate) 174 { 175 setValue ("RequiresTaxCertificate", new Boolean (RequiresTaxCertificate)); 176 } 177 public boolean isRequiresTaxCertificate() 178 { 179 Boolean bb = (Boolean )getValue("RequiresTaxCertificate"); 180 if (bb != null) return bb.booleanValue(); 181 return false; 182 } 183 public static final String SOPOTYPE_Both = "B"; 184 public static final String SOPOTYPE_SalesTax = "S"; 185 public static final String SOPOTYPE_PurchaseTax = "P"; 186 public void setSOPOType (String SOPOType) 187 { 188 if (SOPOType.equals("B") || SOPOType.equals("S") || SOPOType.equals("P")); 189 else throw new IllegalArgumentException ("SOPOType Invalid value - Reference_ID=287 - B - S - P"); 190 if (SOPOType == null) throw new IllegalArgumentException ("SOPOType is mandatory"); 191 setValue ("SOPOType", SOPOType); 192 } 193 public String getSOPOType() 194 { 195 return (String )getValue("SOPOType"); 196 } 197 public void setTaxIndicator (String TaxIndicator) 198 { 199 setValue ("TaxIndicator", TaxIndicator); 200 } 201 public String getTaxIndicator() 202 { 203 return (String )getValue("TaxIndicator"); 204 } 205 public void setTo_Country_ID (int To_Country_ID) 206 { 207 if (To_Country_ID == 0) setValue ("To_Country_ID", null); 208 else 209 setValue ("To_Country_ID", new Integer (To_Country_ID)); 210 } 211 public int getTo_Country_ID() 212 { 213 Integer ii = (Integer )getValue("To_Country_ID"); 214 if (ii == null) return 0; 215 return ii.intValue(); 216 } 217 public void setTo_Region_ID (int To_Region_ID) 218 { 219 if (To_Region_ID == 0) setValue ("To_Region_ID", null); 220 else 221 setValue ("To_Region_ID", new Integer (To_Region_ID)); 222 } 223 public int getTo_Region_ID() 224 { 225 Integer ii = (Integer )getValue("To_Region_ID"); 226 if (ii == null) return 0; 227 return ii.intValue(); 228 } 229 public void setValidFrom (Timestamp ValidFrom) 230 { 231 if (ValidFrom == null) throw new IllegalArgumentException ("ValidFrom is mandatory"); 232 setValue ("ValidFrom", ValidFrom); 233 } 234 public Timestamp getValidFrom() 235 { 236 return (Timestamp)getValue("ValidFrom"); 237 } 238 } 239 | Popular Tags |