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_Invoice extends PO 11 { 12 13 public X_C_Invoice (Properties ctx, int C_Invoice_ID) 14 { 15 super (ctx, C_Invoice_ID); 16 47 } 48 49 public X_C_Invoice (Properties ctx, ResultSet rs) 50 { 51 super (ctx, rs); 52 } 53 54 protected POInfo initPO (Properties ctx) 55 { 56 int AD_Table_ID = 318; 57 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 58 return poi; 59 } 60 public String toString() 61 { 62 StringBuffer sb = new StringBuffer ("X_C_Invoice[").append(getID()).append("]"); 63 return sb.toString(); 64 } 65 public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) 66 { 67 if (AD_OrgTrx_ID == 0) setValue ("AD_OrgTrx_ID", null); 68 else 69 setValue ("AD_OrgTrx_ID", new Integer (AD_OrgTrx_ID)); 70 } 71 public int getAD_OrgTrx_ID() 72 { 73 Integer ii = (Integer )getValue("AD_OrgTrx_ID"); 74 if (ii == null) return 0; 75 return ii.intValue(); 76 } 77 public void setAD_User_ID (int AD_User_ID) 78 { 79 if (AD_User_ID == 0) setValue ("AD_User_ID", null); 80 else 81 setValue ("AD_User_ID", new Integer (AD_User_ID)); 82 } 83 public int getAD_User_ID() 84 { 85 Integer ii = (Integer )getValue("AD_User_ID"); 86 if (ii == null) return 0; 87 return ii.intValue(); 88 } 89 public void setC_Activity_ID (int C_Activity_ID) 90 { 91 if (C_Activity_ID == 0) setValue ("C_Activity_ID", null); 92 else 93 setValue ("C_Activity_ID", new Integer (C_Activity_ID)); 94 } 95 public int getC_Activity_ID() 96 { 97 Integer ii = (Integer )getValue("C_Activity_ID"); 98 if (ii == null) return 0; 99 return ii.intValue(); 100 } 101 public void setC_BPartner_ID (int C_BPartner_ID) 102 { 103 setValue ("C_BPartner_ID", new Integer (C_BPartner_ID)); 104 } 105 public int getC_BPartner_ID() 106 { 107 Integer ii = (Integer )getValue("C_BPartner_ID"); 108 if (ii == null) return 0; 109 return ii.intValue(); 110 } 111 public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) 112 { 113 setValue ("C_BPartner_Location_ID", new Integer (C_BPartner_Location_ID)); 114 } 115 public int getC_BPartner_Location_ID() 116 { 117 Integer ii = (Integer )getValue("C_BPartner_Location_ID"); 118 if (ii == null) return 0; 119 return ii.intValue(); 120 } 121 public void setC_Campaign_ID (int C_Campaign_ID) 122 { 123 if (C_Campaign_ID == 0) setValue ("C_Campaign_ID", null); 124 else 125 setValue ("C_Campaign_ID", new Integer (C_Campaign_ID)); 126 } 127 public int getC_Campaign_ID() 128 { 129 Integer ii = (Integer )getValue("C_Campaign_ID"); 130 if (ii == null) return 0; 131 return ii.intValue(); 132 } 133 public void setC_CashLine_ID (int C_CashLine_ID) 134 { 135 if (C_CashLine_ID == 0) setValue ("C_CashLine_ID", null); 136 else 137 setValue ("C_CashLine_ID", new Integer (C_CashLine_ID)); 138 } 139 public int getC_CashLine_ID() 140 { 141 Integer ii = (Integer )getValue("C_CashLine_ID"); 142 if (ii == null) return 0; 143 return ii.intValue(); 144 } 145 public void setC_Charge_ID (int C_Charge_ID) 146 { 147 if (C_Charge_ID == 0) setValue ("C_Charge_ID", null); 148 else 149 setValue ("C_Charge_ID", new Integer (C_Charge_ID)); 150 } 151 public int getC_Charge_ID() 152 { 153 Integer ii = (Integer )getValue("C_Charge_ID"); 154 if (ii == null) return 0; 155 return ii.intValue(); 156 } 157 public void setC_Currency_ID (int C_Currency_ID) 158 { 159 setValue ("C_Currency_ID", new Integer (C_Currency_ID)); 160 } 161 public int getC_Currency_ID() 162 { 163 Integer ii = (Integer )getValue("C_Currency_ID"); 164 if (ii == null) return 0; 165 return ii.intValue(); 166 } 167 public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID) 168 { 169 setValue ("C_DocTypeTarget_ID", new Integer (C_DocTypeTarget_ID)); 170 } 171 public int getC_DocTypeTarget_ID() 172 { 173 Integer ii = (Integer )getValue("C_DocTypeTarget_ID"); 174 if (ii == null) return 0; 175 return ii.intValue(); 176 } 177 void setC_DocType_ID (int C_DocType_ID) 178 { 179 setValueNoCheck ("C_DocType_ID", new Integer (C_DocType_ID)); 180 } 181 public int getC_DocType_ID() 182 { 183 Integer ii = (Integer )getValue("C_DocType_ID"); 184 if (ii == null) return 0; 185 return ii.intValue(); 186 } 187 void setC_Invoice_ID (int C_Invoice_ID) 188 { 189 setValueNoCheck ("C_Invoice_ID", new Integer (C_Invoice_ID)); 190 } 191 public int getC_Invoice_ID() 192 { 193 Integer ii = (Integer )getValue("C_Invoice_ID"); 194 if (ii == null) return 0; 195 return ii.intValue(); 196 } 197 void setC_Order_ID (int C_Order_ID) 198 { 199 if (C_Order_ID == 0) setValueNoCheck ("C_Order_ID", null); 200 else 201 setValueNoCheck ("C_Order_ID", new Integer (C_Order_ID)); 202 } 203 public int getC_Order_ID() 204 { 205 Integer ii = (Integer )getValue("C_Order_ID"); 206 if (ii == null) return 0; 207 return ii.intValue(); 208 } 209 public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) 210 { 211 setValue ("C_PaymentTerm_ID", new Integer (C_PaymentTerm_ID)); 212 } 213 public int getC_PaymentTerm_ID() 214 { 215 Integer ii = (Integer )getValue("C_PaymentTerm_ID"); 216 if (ii == null) return 0; 217 return ii.intValue(); 218 } 219 public void setC_Payment_ID (int C_Payment_ID) 220 { 221 if (C_Payment_ID == 0) setValue ("C_Payment_ID", null); 222 else 223 setValue ("C_Payment_ID", new Integer (C_Payment_ID)); 224 } 225 public int getC_Payment_ID() 226 { 227 Integer ii = (Integer )getValue("C_Payment_ID"); 228 if (ii == null) return 0; 229 return ii.intValue(); 230 } 231 public void setC_Project_ID (int C_Project_ID) 232 { 233 if (C_Project_ID == 0) setValue ("C_Project_ID", null); 234 else 235 setValue ("C_Project_ID", new Integer (C_Project_ID)); 236 } 237 public int getC_Project_ID() 238 { 239 Integer ii = (Integer )getValue("C_Project_ID"); 240 if (ii == null) return 0; 241 return ii.intValue(); 242 } 243 public void setChargeAmt (BigDecimal ChargeAmt) 244 { 245 setValue ("ChargeAmt", ChargeAmt); 246 } 247 public BigDecimal getChargeAmt() 248 { 249 BigDecimal bd = (BigDecimal)getValue("ChargeAmt"); 250 if (bd == null) return Env.ZERO; 251 return bd; 252 } 253 public void setCopyFrom (String CopyFrom) 254 { 255 setValue ("CopyFrom", CopyFrom); 256 } 257 public String getCopyFrom() 258 { 259 return (String )getValue("CopyFrom"); 260 } 261 public void setCreateFrom (String CreateFrom) 262 { 263 setValue ("CreateFrom", CreateFrom); 264 } 265 public String getCreateFrom() 266 { 267 return (String )getValue("CreateFrom"); 268 } 269 public void setDateAcct (Timestamp DateAcct) 270 { 271 if (DateAcct == null) throw new IllegalArgumentException ("DateAcct is mandatory"); 272 setValue ("DateAcct", DateAcct); 273 } 274 public Timestamp getDateAcct() 275 { 276 return (Timestamp)getValue("DateAcct"); 277 } 278 public void setDateInvoiced (Timestamp DateInvoiced) 279 { 280 if (DateInvoiced == null) throw new IllegalArgumentException ("DateInvoiced is mandatory"); 281 setValue ("DateInvoiced", DateInvoiced); 282 } 283 public Timestamp getDateInvoiced() 284 { 285 return (Timestamp)getValue("DateInvoiced"); 286 } 287 void setDateOrdered (Timestamp DateOrdered) 288 { 289 setValueNoCheck ("DateOrdered", DateOrdered); 290 } 291 public Timestamp getDateOrdered() 292 { 293 return (Timestamp)getValue("DateOrdered"); 294 } 295 public void setDatePrinted (Timestamp DatePrinted) 296 { 297 setValue ("DatePrinted", DatePrinted); 298 } 299 public Timestamp getDatePrinted() 300 { 301 return (Timestamp)getValue("DatePrinted"); 302 } 303 public void setDescription (String Description) 304 { 305 setValue ("Description", Description); 306 } 307 public String getDescription() 308 { 309 return (String )getValue("Description"); 310 } 311 public static final String DOCACTION_Process = "PR"; 312 public static final String DOCACTION_Unlock = "XL"; 313 public static final String DOCACTION_Complete = "CO"; 314 public static final String DOCACTION_Approve = "AP"; 315 public static final String DOCACTION_Reject = "RJ"; 316 public static final String DOCACTION_Post = "PO"; 317 public static final String DOCACTION_Void = "VO"; 318 public static final String DOCACTION_Close = "CL"; 319 public static final String DOCACTION_ReverseMinusCorrection = "RC"; 320 public static final String DOCACTION_ReverseMinusAccrual = "RA"; 321 public static final String DOCACTION_Transfer = "TR"; 322 public static final String DOCACTION_ReMinusActivate = "RE"; 323 public static final String DOCACTION_LeNoneGt = "--"; 324 public void setDocAction (String DocAction) 325 { 326 if (DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("CO") || DocAction.equals("AP") || DocAction.equals("RJ") || DocAction.equals("PO") || DocAction.equals("VO") || DocAction.equals("CL") || DocAction.equals("RC") || DocAction.equals("RA") || DocAction.equals("TR") || DocAction.equals("RE") || DocAction.equals("--")); 327 else throw new IllegalArgumentException ("DocAction Invalid value - Reference_ID=135 - PR - XL - CO - AP - RJ - PO - VO - CL - RC - RA - TR - RE - --"); 328 if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); 329 setValue ("DocAction", DocAction); 330 } 331 public String getDocAction() 332 { 333 return (String )getValue("DocAction"); 334 } 335 public static final String DOCSTATUS_InProgress = "IP"; 336 public static final String DOCSTATUS_WaitingPayment = "WP"; 337 public static final String DOCSTATUS_Drafted = "DR"; 338 public static final String DOCSTATUS_Completed = "CO"; 339 public static final String DOCSTATUS_Approved = "AP"; 340 public static final String DOCSTATUS_Changed = "CH"; 341 public static final String DOCSTATUS_NotApproved = "NA"; 342 public static final String DOCSTATUS_TransferError = "TE"; 343 public static final String DOCSTATUS_Printed = "PR"; 344 public static final String DOCSTATUS_Transferred = "TR"; 345 public static final String DOCSTATUS_Voided = "VO"; 346 public static final String DOCSTATUS_Inactive = "IN"; 347 public static final String DOCSTATUS_PostingError = "PE"; 348 public static final String DOCSTATUS_Posted = "PO"; 349 public static final String DOCSTATUS_Reversed = "RE"; 350 public static final String DOCSTATUS_Closed = "CL"; 351 public static final String DOCSTATUS_Unknown = "??"; 352 public static final String DOCSTATUS_BeingProcessed = "XX"; 353 void setDocStatus (String DocStatus) 354 { 355 if (DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("CH") || DocStatus.equals("NA") || DocStatus.equals("TE") || DocStatus.equals("PR") || DocStatus.equals("TR") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("PE") || DocStatus.equals("PO") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("XX")); 356 else throw new IllegalArgumentException ("DocStatus Invalid value - Reference_ID=131 - IP - WP - DR - CO - AP - CH - NA - TE - PR - TR - VO - IN - PE - PO - RE - CL - ?? - XX"); 357 if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); 358 setValueNoCheck ("DocStatus", DocStatus); 359 } 360 public String getDocStatus() 361 { 362 return (String )getValue("DocStatus"); 363 } 364 void setDocumentNo (String DocumentNo) 365 { 366 if (DocumentNo == null) throw new IllegalArgumentException ("DocumentNo is mandatory"); 367 setValueNoCheck ("DocumentNo", DocumentNo); 368 } 369 public String getDocumentNo() 370 { 371 return (String )getValue("DocumentNo"); 372 } 373 public void setGenerateTo (String GenerateTo) 374 { 375 setValue ("GenerateTo", GenerateTo); 376 } 377 public String getGenerateTo() 378 { 379 return (String )getValue("GenerateTo"); 380 } 381 void setGrandTotal (BigDecimal GrandTotal) 382 { 383 if (GrandTotal == null) throw new IllegalArgumentException ("GrandTotal is mandatory"); 384 setValueNoCheck ("GrandTotal", GrandTotal); 385 } 386 public BigDecimal getGrandTotal() 387 { 388 BigDecimal bd = (BigDecimal)getValue("GrandTotal"); 389 if (bd == null) return Env.ZERO; 390 return bd; 391 } 392 void setIsApproved (boolean IsApproved) 393 { 394 setValueNoCheck ("IsApproved", new Boolean (IsApproved)); 395 } 396 public boolean isApproved() 397 { 398 Boolean bb = (Boolean )getValue("IsApproved"); 399 if (bb != null) return bb.booleanValue(); 400 return false; 401 } 402 public void setIsDiscountPrinted (boolean IsDiscountPrinted) 403 { 404 setValue ("IsDiscountPrinted", new Boolean (IsDiscountPrinted)); 405 } 406 public boolean isDiscountPrinted() 407 { 408 Boolean bb = (Boolean )getValue("IsDiscountPrinted"); 409 if (bb != null) return bb.booleanValue(); 410 return false; 411 } 412 public void setIsPaid (boolean IsPaid) 413 { 414 setValue ("IsPaid", new Boolean (IsPaid)); 415 } 416 public boolean isPaid() 417 { 418 Boolean bb = (Boolean )getValue("IsPaid"); 419 if (bb != null) return bb.booleanValue(); 420 return false; 421 } 422 void setIsPrinted (boolean IsPrinted) 423 { 424 setValueNoCheck ("IsPrinted", new Boolean (IsPrinted)); 425 } 426 public boolean isPrinted() 427 { 428 Boolean bb = (Boolean )getValue("IsPrinted"); 429 if (bb != null) return bb.booleanValue(); 430 return false; 431 } 432 void setIsSOTrx (boolean IsSOTrx) 433 { 434 setValueNoCheck ("IsSOTrx", new Boolean (IsSOTrx)); 435 } 436 public boolean isSOTrx() 437 { 438 Boolean bb = (Boolean )getValue("IsSOTrx"); 439 if (bb != null) return bb.booleanValue(); 440 return false; 441 } 442 public void setIsSelfService (boolean IsSelfService) 443 { 444 setValue ("IsSelfService", new Boolean (IsSelfService)); 445 } 446 public boolean isSelfService() 447 { 448 Boolean bb = (Boolean )getValue("IsSelfService"); 449 if (bb != null) return bb.booleanValue(); 450 return false; 451 } 452 public void setIsTaxIncluded (boolean IsTaxIncluded) 453 { 454 setValue ("IsTaxIncluded", new Boolean (IsTaxIncluded)); 455 } 456 public boolean isTaxIncluded() 457 { 458 Boolean bb = (Boolean )getValue("IsTaxIncluded"); 459 if (bb != null) return bb.booleanValue(); 460 return false; 461 } 462 void setIsTransferred (boolean IsTransferred) 463 { 464 setValueNoCheck ("IsTransferred", new Boolean (IsTransferred)); 465 } 466 public boolean isTransferred() 467 { 468 Boolean bb = (Boolean )getValue("IsTransferred"); 469 if (bb != null) return bb.booleanValue(); 470 return false; 471 } 472 public void setM_PriceList_ID (int M_PriceList_ID) 473 { 474 setValue ("M_PriceList_ID", new Integer (M_PriceList_ID)); 475 } 476 public int getM_PriceList_ID() 477 { 478 Integer ii = (Integer )getValue("M_PriceList_ID"); 479 if (ii == null) return 0; 480 return ii.intValue(); 481 } 482 public void setPOReference (String POReference) 483 { 484 setValue ("POReference", POReference); 485 } 486 public String getPOReference() 487 { 488 return (String )getValue("POReference"); 489 } 490 public static final String PAYMENTRULE_Cash = "B"; 491 public static final String PAYMENTRULE_CreditCard = "K"; 492 public static final String PAYMENTRULE_TransferACH = "T"; 493 public static final String PAYMENTRULE_Check = "S"; 494 public static final String PAYMENTRULE_OnCredit = "P"; 495 public void setPaymentRule (String PaymentRule) 496 { 497 if (PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P")); 498 else throw new IllegalArgumentException ("PaymentRule Invalid value - Reference_ID=195 - B - K - T - S - P"); 499 if (PaymentRule == null) throw new IllegalArgumentException ("PaymentRule is mandatory"); 500 setValue ("PaymentRule", PaymentRule); 501 } 502 public String getPaymentRule() 503 { 504 return (String )getValue("PaymentRule"); 505 } 506 public void setPosted (boolean Posted) 507 { 508 setValue ("Posted", new Boolean (Posted)); 509 } 510 public boolean isPosted() 511 { 512 Boolean bb = (Boolean )getValue("Posted"); 513 if (bb != null) return bb.booleanValue(); 514 return false; 515 } 516 void setProcessed (boolean Processed) 517 { 518 setValueNoCheck ("Processed", new Boolean (Processed)); 519 } 520 public boolean isProcessed() 521 { 522 Boolean bb = (Boolean )getValue("Processed"); 523 if (bb != null) return bb.booleanValue(); 524 return false; 525 } 526 public void setProcessing (String Processing) 527 { 528 setValue ("Processing", Processing); 529 } 530 public String getProcessing() 531 { 532 return (String )getValue("Processing"); 533 } 534 public void setSalesRep_ID (int SalesRep_ID) 535 { 536 if (SalesRep_ID == 0) setValue ("SalesRep_ID", null); 537 else 538 setValue ("SalesRep_ID", new Integer (SalesRep_ID)); 539 } 540 public int getSalesRep_ID() 541 { 542 Integer ii = (Integer )getValue("SalesRep_ID"); 543 if (ii == null) return 0; 544 return ii.intValue(); 545 } 546 public void setSendEMail (boolean SendEMail) 547 { 548 setValue ("SendEMail", new Boolean (SendEMail)); 549 } 550 public boolean isSendEMail() 551 { 552 Boolean bb = (Boolean )getValue("SendEMail"); 553 if (bb != null) return bb.booleanValue(); 554 return false; 555 } 556 void setTotalLines (BigDecimal TotalLines) 557 { 558 if (TotalLines == null) throw new IllegalArgumentException ("TotalLines is mandatory"); 559 setValueNoCheck ("TotalLines", TotalLines); 560 } 561 public BigDecimal getTotalLines() 562 { 563 BigDecimal bd = (BigDecimal)getValue("TotalLines"); 564 if (bd == null) return Env.ZERO; 565 return bd; 566 } 567 public void setUser1_ID (int User1_ID) 568 { 569 if (User1_ID == 0) setValue ("User1_ID", null); 570 else 571 setValue ("User1_ID", new Integer (User1_ID)); 572 } 573 public int getUser1_ID() 574 { 575 Integer ii = (Integer )getValue("User1_ID"); 576 if (ii == null) return 0; 577 return ii.intValue(); 578 } 579 public void setUser2_ID (int User2_ID) 580 { 581 if (User2_ID == 0) setValue ("User2_ID", null); 582 else 583 setValue ("User2_ID", new Integer (User2_ID)); 584 } 585 public int getUser2_ID() 586 { 587 Integer ii = (Integer )getValue("User2_ID"); 588 if (ii == null) return 0; 589 return ii.intValue(); 590 } 591 } 592 | Popular Tags |