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_CashLine extends PO 11 { 12 13 public X_C_CashLine (Properties ctx, int C_CashLine_ID) 14 { 15 super (ctx, C_CashLine_ID); 16 25 } 26 27 public X_C_CashLine (Properties ctx, ResultSet rs) 28 { 29 super (ctx, rs); 30 } 31 32 protected POInfo initPO (Properties ctx) 33 { 34 int AD_Table_ID = 410; 35 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 36 return poi; 37 } 38 public String toString() 39 { 40 StringBuffer sb = new StringBuffer ("X_C_CashLine[").append(getID()).append("]"); 41 return sb.toString(); 42 } 43 public void setAmount (BigDecimal Amount) 44 { 45 if (Amount == null) throw new IllegalArgumentException ("Amount is mandatory"); 46 setValue ("Amount", Amount); 47 } 48 public BigDecimal getAmount() 49 { 50 BigDecimal bd = (BigDecimal)getValue("Amount"); 51 if (bd == null) return Env.ZERO; 52 return bd; 53 } 54 public void setC_BankAccount_ID (int C_BankAccount_ID) 55 { 56 if (C_BankAccount_ID == 0) setValue ("C_BankAccount_ID", null); 57 else 58 setValue ("C_BankAccount_ID", new Integer (C_BankAccount_ID)); 59 } 60 public int getC_BankAccount_ID() 61 { 62 Integer ii = (Integer )getValue("C_BankAccount_ID"); 63 if (ii == null) return 0; 64 return ii.intValue(); 65 } 66 void setC_CashLine_ID (int C_CashLine_ID) 67 { 68 setValueNoCheck ("C_CashLine_ID", new Integer (C_CashLine_ID)); 69 } 70 public int getC_CashLine_ID() 71 { 72 Integer ii = (Integer )getValue("C_CashLine_ID"); 73 if (ii == null) return 0; 74 return ii.intValue(); 75 } 76 void setC_Cash_ID (int C_Cash_ID) 77 { 78 setValueNoCheck ("C_Cash_ID", new Integer (C_Cash_ID)); 79 } 80 public int getC_Cash_ID() 81 { 82 Integer ii = (Integer )getValue("C_Cash_ID"); 83 if (ii == null) return 0; 84 return ii.intValue(); 85 } 86 public void setC_Charge_ID (int C_Charge_ID) 87 { 88 if (C_Charge_ID == 0) setValue ("C_Charge_ID", null); 89 else 90 setValue ("C_Charge_ID", new Integer (C_Charge_ID)); 91 } 92 public int getC_Charge_ID() 93 { 94 Integer ii = (Integer )getValue("C_Charge_ID"); 95 if (ii == null) return 0; 96 return ii.intValue(); 97 } 98 void setC_Currency_ID (int C_Currency_ID) 99 { 100 if (C_Currency_ID == 0) setValueNoCheck ("C_Currency_ID", null); 101 else 102 setValueNoCheck ("C_Currency_ID", new Integer (C_Currency_ID)); 103 } 104 public int getC_Currency_ID() 105 { 106 Integer ii = (Integer )getValue("C_Currency_ID"); 107 if (ii == null) return 0; 108 return ii.intValue(); 109 } 110 void setC_Invoice_ID (int C_Invoice_ID) 111 { 112 if (C_Invoice_ID == 0) setValueNoCheck ("C_Invoice_ID", null); 113 else 114 setValueNoCheck ("C_Invoice_ID", new Integer (C_Invoice_ID)); 115 } 116 public int getC_Invoice_ID() 117 { 118 Integer ii = (Integer )getValue("C_Invoice_ID"); 119 if (ii == null) return 0; 120 return ii.intValue(); 121 } 122 public static final String CASHTYPE_TransferToBankAccount = "T"; 123 public static final String CASHTYPE_Invoice = "I"; 124 public static final String CASHTYPE_GeneralExpense = "E"; 125 public static final String CASHTYPE_GeneralReceipts = "R"; 126 public static final String CASHTYPE_Charge = "C"; 127 public static final String CASHTYPE_Difference = "D"; 128 public void setCashType (String CashType) 129 { 130 if (CashType.equals("T") || CashType.equals("I") || CashType.equals("E") || CashType.equals("R") || CashType.equals("C") || CashType.equals("D")); 131 else throw new IllegalArgumentException ("CashType Invalid value - Reference_ID=217 - T - I - E - R - C - D"); 132 if (CashType == null) throw new IllegalArgumentException ("CashType is mandatory"); 133 setValue ("CashType", CashType); 134 } 135 public String getCashType() 136 { 137 return (String )getValue("CashType"); 138 } 139 public void setDescription (String Description) 140 { 141 setValue ("Description", Description); 142 } 143 public String getDescription() 144 { 145 return (String )getValue("Description"); 146 } 147 public void setDiscountAmt (BigDecimal DiscountAmt) 148 { 149 setValue ("DiscountAmt", DiscountAmt); 150 } 151 public BigDecimal getDiscountAmt() 152 { 153 BigDecimal bd = (BigDecimal)getValue("DiscountAmt"); 154 if (bd == null) return Env.ZERO; 155 return bd; 156 } 157 void setIsGenerated (boolean IsGenerated) 158 { 159 setValueNoCheck ("IsGenerated", new Boolean (IsGenerated)); 160 } 161 public boolean isGenerated() 162 { 163 Boolean bb = (Boolean )getValue("IsGenerated"); 164 if (bb != null) return bb.booleanValue(); 165 return false; 166 } 167 public void setLine (int Line) 168 { 169 setValue ("Line", new Integer (Line)); 170 } 171 public int getLine() 172 { 173 Integer ii = (Integer )getValue("Line"); 174 if (ii == null) return 0; 175 return ii.intValue(); 176 } 177 public void setWriteOffAmt (BigDecimal WriteOffAmt) 178 { 179 setValue ("WriteOffAmt", WriteOffAmt); 180 } 181 public BigDecimal getWriteOffAmt() 182 { 183 BigDecimal bd = (BigDecimal)getValue("WriteOffAmt"); 184 if (bd == null) return Env.ZERO; 185 return bd; 186 } 187 } 188 | Popular Tags |