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_Order extends PO 11 { 12 13 public X_C_Order (Properties ctx, int C_Order_ID) 14 { 15 super (ctx, C_Order_ID); 16 60 } 61 62 public X_C_Order (Properties ctx, ResultSet rs) 63 { 64 super (ctx, rs); 65 } 66 67 protected POInfo initPO (Properties ctx) 68 { 69 int AD_Table_ID = 259; 70 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 71 return poi; 72 } 73 public String toString() 74 { 75 StringBuffer sb = new StringBuffer ("X_C_Order[").append(getID()).append("]"); 76 return sb.toString(); 77 } 78 public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) 79 { 80 if (AD_OrgTrx_ID == 0) setValue ("AD_OrgTrx_ID", null); 81 else 82 setValue ("AD_OrgTrx_ID", new Integer (AD_OrgTrx_ID)); 83 } 84 public int getAD_OrgTrx_ID() 85 { 86 Integer ii = (Integer )getValue("AD_OrgTrx_ID"); 87 if (ii == null) return 0; 88 return ii.intValue(); 89 } 90 public void setAD_User_ID (int AD_User_ID) 91 { 92 if (AD_User_ID == 0) setValue ("AD_User_ID", null); 93 else 94 setValue ("AD_User_ID", new Integer (AD_User_ID)); 95 } 96 public int getAD_User_ID() 97 { 98 Integer ii = (Integer )getValue("AD_User_ID"); 99 if (ii == null) return 0; 100 return ii.intValue(); 101 } 102 public void setBillTo_ID (int BillTo_ID) 103 { 104 setValue ("BillTo_ID", new Integer (BillTo_ID)); 105 } 106 public int getBillTo_ID() 107 { 108 Integer ii = (Integer )getValue("BillTo_ID"); 109 if (ii == null) return 0; 110 return ii.intValue(); 111 } 112 public void setC_Activity_ID (int C_Activity_ID) 113 { 114 if (C_Activity_ID == 0) setValue ("C_Activity_ID", null); 115 else 116 setValue ("C_Activity_ID", new Integer (C_Activity_ID)); 117 } 118 public int getC_Activity_ID() 119 { 120 Integer ii = (Integer )getValue("C_Activity_ID"); 121 if (ii == null) return 0; 122 return ii.intValue(); 123 } 124 public void setC_BPartner_ID (int C_BPartner_ID) 125 { 126 setValue ("C_BPartner_ID", new Integer (C_BPartner_ID)); 127 } 128 public int getC_BPartner_ID() 129 { 130 Integer ii = (Integer )getValue("C_BPartner_ID"); 131 if (ii == null) return 0; 132 return ii.intValue(); 133 } 134 public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) 135 { 136 setValue ("C_BPartner_Location_ID", new Integer (C_BPartner_Location_ID)); 137 } 138 public int getC_BPartner_Location_ID() 139 { 140 Integer ii = (Integer )getValue("C_BPartner_Location_ID"); 141 if (ii == null) return 0; 142 return ii.intValue(); 143 } 144 public void setC_Campaign_ID (int C_Campaign_ID) 145 { 146 if (C_Campaign_ID == 0) setValue ("C_Campaign_ID", null); 147 else 148 setValue ("C_Campaign_ID", new Integer (C_Campaign_ID)); 149 } 150 public int getC_Campaign_ID() 151 { 152 Integer ii = (Integer )getValue("C_Campaign_ID"); 153 if (ii == null) return 0; 154 return ii.intValue(); 155 } 156 public void setC_CashLine_ID (int C_CashLine_ID) 157 { 158 if (C_CashLine_ID == 0) setValue ("C_CashLine_ID", null); 159 else 160 setValue ("C_CashLine_ID", new Integer (C_CashLine_ID)); 161 } 162 public int getC_CashLine_ID() 163 { 164 Integer ii = (Integer )getValue("C_CashLine_ID"); 165 if (ii == null) return 0; 166 return ii.intValue(); 167 } 168 public void setC_Charge_ID (int C_Charge_ID) 169 { 170 if (C_Charge_ID == 0) setValue ("C_Charge_ID", null); 171 else 172 setValue ("C_Charge_ID", new Integer (C_Charge_ID)); 173 } 174 public int getC_Charge_ID() 175 { 176 Integer ii = (Integer )getValue("C_Charge_ID"); 177 if (ii == null) return 0; 178 return ii.intValue(); 179 } 180 void setC_Currency_ID (int C_Currency_ID) 181 { 182 setValueNoCheck ("C_Currency_ID", new Integer (C_Currency_ID)); 183 } 184 public int getC_Currency_ID() 185 { 186 Integer ii = (Integer )getValue("C_Currency_ID"); 187 if (ii == null) return 0; 188 return ii.intValue(); 189 } 190 public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID) 191 { 192 setValue ("C_DocTypeTarget_ID", new Integer (C_DocTypeTarget_ID)); 193 } 194 public int getC_DocTypeTarget_ID() 195 { 196 Integer ii = (Integer )getValue("C_DocTypeTarget_ID"); 197 if (ii == null) return 0; 198 return ii.intValue(); 199 } 200 void setC_DocType_ID (int C_DocType_ID) 201 { 202 setValueNoCheck ("C_DocType_ID", new Integer (C_DocType_ID)); 203 } 204 public int getC_DocType_ID() 205 { 206 Integer ii = (Integer )getValue("C_DocType_ID"); 207 if (ii == null) return 0; 208 return ii.intValue(); 209 } 210 void setC_Order_ID (int C_Order_ID) 211 { 212 setValueNoCheck ("C_Order_ID", new Integer (C_Order_ID)); 213 } 214 public int getC_Order_ID() 215 { 216 Integer ii = (Integer )getValue("C_Order_ID"); 217 if (ii == null) return 0; 218 return ii.intValue(); 219 } 220 public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) 221 { 222 setValue ("C_PaymentTerm_ID", new Integer (C_PaymentTerm_ID)); 223 } 224 public int getC_PaymentTerm_ID() 225 { 226 Integer ii = (Integer )getValue("C_PaymentTerm_ID"); 227 if (ii == null) return 0; 228 return ii.intValue(); 229 } 230 public void setC_Payment_ID (int C_Payment_ID) 231 { 232 if (C_Payment_ID == 0) setValue ("C_Payment_ID", null); 233 else 234 setValue ("C_Payment_ID", new Integer (C_Payment_ID)); 235 } 236 public int getC_Payment_ID() 237 { 238 Integer ii = (Integer )getValue("C_Payment_ID"); 239 if (ii == null) return 0; 240 return ii.intValue(); 241 } 242 public void setC_Project_ID (int C_Project_ID) 243 { 244 if (C_Project_ID == 0) setValue ("C_Project_ID", null); 245 else 246 setValue ("C_Project_ID", new Integer (C_Project_ID)); 247 } 248 public int getC_Project_ID() 249 { 250 Integer ii = (Integer )getValue("C_Project_ID"); 251 if (ii == null) return 0; 252 return ii.intValue(); 253 } 254 public void setChargeAmt (BigDecimal ChargeAmt) 255 { 256 setValue ("ChargeAmt", ChargeAmt); 257 } 258 public BigDecimal getChargeAmt() 259 { 260 BigDecimal bd = (BigDecimal)getValue("ChargeAmt"); 261 if (bd == null) return Env.ZERO; 262 return bd; 263 } 264 public void setCopyFrom (String CopyFrom) 265 { 266 setValue ("CopyFrom", CopyFrom); 267 } 268 public String getCopyFrom() 269 { 270 return (String )getValue("CopyFrom"); 271 } 272 public void setDateAcct (Timestamp DateAcct) 273 { 274 if (DateAcct == null) throw new IllegalArgumentException ("DateAcct is mandatory"); 275 setValue ("DateAcct", DateAcct); 276 } 277 public Timestamp getDateAcct() 278 { 279 return (Timestamp)getValue("DateAcct"); 280 } 281 public void setDateOrdered (Timestamp DateOrdered) 282 { 283 if (DateOrdered == null) throw new IllegalArgumentException ("DateOrdered is mandatory"); 284 setValue ("DateOrdered", DateOrdered); 285 } 286 public Timestamp getDateOrdered() 287 { 288 return (Timestamp)getValue("DateOrdered"); 289 } 290 public void setDatePrinted (Timestamp DatePrinted) 291 { 292 setValue ("DatePrinted", DatePrinted); 293 } 294 public Timestamp getDatePrinted() 295 { 296 return (Timestamp)getValue("DatePrinted"); 297 } 298 public void setDatePromised (Timestamp DatePromised) 299 { 300 if (DatePromised == null) throw new IllegalArgumentException ("DatePromised is mandatory"); 301 setValue ("DatePromised", DatePromised); 302 } 303 public Timestamp getDatePromised() 304 { 305 return (Timestamp)getValue("DatePromised"); 306 } 307 public static final String DELIVERYRULE_AfterReceipt = "R"; 308 public static final String DELIVERYRULE_Availability = "A"; 309 public static final String DELIVERYRULE_CompleteLine = "L"; 310 public static final String DELIVERYRULE_CompleteOrder = "O"; 311 public void setDeliveryRule (String DeliveryRule) 312 { 313 if (DeliveryRule.equals("R") || DeliveryRule.equals("A") || DeliveryRule.equals("L") || DeliveryRule.equals("O")); 314 else throw new IllegalArgumentException ("DeliveryRule Invalid value - Reference_ID=151 - R - A - L - O"); 315 if (DeliveryRule == null) throw new IllegalArgumentException ("DeliveryRule is mandatory"); 316 setValue ("DeliveryRule", DeliveryRule); 317 } 318 public String getDeliveryRule() 319 { 320 return (String )getValue("DeliveryRule"); 321 } 322 public static final String DELIVERYVIARULE_Pickup = "P"; 323 public static final String DELIVERYVIARULE_Delivery = "D"; 324 public static final String DELIVERYVIARULE_Shipper = "S"; 325 public void setDeliveryViaRule (String DeliveryViaRule) 326 { 327 if (DeliveryViaRule.equals("P") || DeliveryViaRule.equals("D") || DeliveryViaRule.equals("S")); 328 else throw new IllegalArgumentException ("DeliveryViaRule Invalid value - Reference_ID=152 - P - D - S"); 329 if (DeliveryViaRule == null) throw new IllegalArgumentException ("DeliveryViaRule is mandatory"); 330 setValue ("DeliveryViaRule", DeliveryViaRule); 331 } 332 public String getDeliveryViaRule() 333 { 334 return (String )getValue("DeliveryViaRule"); 335 } 336 public void setDescription (String Description) 337 { 338 setValue ("Description", Description); 339 } 340 public String getDescription() 341 { 342 return (String )getValue("Description"); 343 } 344 public static final String DOCACTION_Process = "PR"; 345 public static final String DOCACTION_Unlock = "XL"; 346 public static final String DOCACTION_Complete = "CO"; 347 public static final String DOCACTION_Approve = "AP"; 348 public static final String DOCACTION_Reject = "RJ"; 349 public static final String DOCACTION_Post = "PO"; 350 public static final String DOCACTION_Void = "VO"; 351 public static final String DOCACTION_Close = "CL"; 352 public static final String DOCACTION_ReverseMinusCorrection = "RC"; 353 public static final String DOCACTION_ReverseMinusAccrual = "RA"; 354 public static final String DOCACTION_Transfer = "TR"; 355 public static final String DOCACTION_ReMinusActivate = "RE"; 356 public static final String DOCACTION_LeNoneGt = "--"; 357 public void setDocAction (String DocAction) 358 { 359 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("--")); 360 else throw new IllegalArgumentException ("DocAction Invalid value - Reference_ID=135 - PR - XL - CO - AP - RJ - PO - VO - CL - RC - RA - TR - RE - --"); 361 if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); 362 setValue ("DocAction", DocAction); 363 } 364 public String getDocAction() 365 { 366 return (String )getValue("DocAction"); 367 } 368 public static final String DOCSTATUS_InProgress = "IP"; 369 public static final String DOCSTATUS_WaitingPayment = "WP"; 370 public static final String DOCSTATUS_Drafted = "DR"; 371 public static final String DOCSTATUS_Completed = "CO"; 372 public static final String DOCSTATUS_Approved = "AP"; 373 public static final String DOCSTATUS_Changed = "CH"; 374 public static final String DOCSTATUS_NotApproved = "NA"; 375 public static final String DOCSTATUS_TransferError = "TE"; 376 public static final String DOCSTATUS_Printed = "PR"; 377 public static final String DOCSTATUS_Transferred = "TR"; 378 public static final String DOCSTATUS_Voided = "VO"; 379 public static final String DOCSTATUS_Inactive = "IN"; 380 public static final String DOCSTATUS_PostingError = "PE"; 381 public static final String DOCSTATUS_Posted = "PO"; 382 public static final String DOCSTATUS_Reversed = "RE"; 383 public static final String DOCSTATUS_Closed = "CL"; 384 public static final String DOCSTATUS_Unknown = "??"; 385 public static final String DOCSTATUS_BeingProcessed = "XX"; 386 void setDocStatus (String DocStatus) 387 { 388 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")); 389 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"); 390 if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); 391 setValueNoCheck ("DocStatus", DocStatus); 392 } 393 public String getDocStatus() 394 { 395 return (String )getValue("DocStatus"); 396 } 397 void setDocumentNo (String DocumentNo) 398 { 399 if (DocumentNo == null) throw new IllegalArgumentException ("DocumentNo is mandatory"); 400 setValueNoCheck ("DocumentNo", DocumentNo); 401 } 402 public String getDocumentNo() 403 { 404 return (String )getValue("DocumentNo"); 405 } 406 public void setDropShip_BPartner_ID (int DropShip_BPartner_ID) 407 { 408 if (DropShip_BPartner_ID == 0) setValue ("DropShip_BPartner_ID", null); 409 else 410 setValue ("DropShip_BPartner_ID", new Integer (DropShip_BPartner_ID)); 411 } 412 public int getDropShip_BPartner_ID() 413 { 414 Integer ii = (Integer )getValue("DropShip_BPartner_ID"); 415 if (ii == null) return 0; 416 return ii.intValue(); 417 } 418 public void setDropShip_Location_ID (int DropShip_Location_ID) 419 { 420 if (DropShip_Location_ID == 0) setValue ("DropShip_Location_ID", null); 421 else 422 setValue ("DropShip_Location_ID", new Integer (DropShip_Location_ID)); 423 } 424 public int getDropShip_Location_ID() 425 { 426 Integer ii = (Integer )getValue("DropShip_Location_ID"); 427 if (ii == null) return 0; 428 return ii.intValue(); 429 } 430 public void setDropShip_User_ID (int DropShip_User_ID) 431 { 432 if (DropShip_User_ID == 0) setValue ("DropShip_User_ID", null); 433 else 434 setValue ("DropShip_User_ID", new Integer (DropShip_User_ID)); 435 } 436 public int getDropShip_User_ID() 437 { 438 Integer ii = (Integer )getValue("DropShip_User_ID"); 439 if (ii == null) return 0; 440 return ii.intValue(); 441 } 442 public void setFreightAmt (BigDecimal FreightAmt) 443 { 444 if (FreightAmt == null) throw new IllegalArgumentException ("FreightAmt is mandatory"); 445 setValue ("FreightAmt", FreightAmt); 446 } 447 public BigDecimal getFreightAmt() 448 { 449 BigDecimal bd = (BigDecimal)getValue("FreightAmt"); 450 if (bd == null) return Env.ZERO; 451 return bd; 452 } 453 public static final String FREIGHTCOSTRULE_FreightIncluded = "I"; 454 public static final String FREIGHTCOSTRULE_FixPrice = "F"; 455 public static final String FREIGHTCOSTRULE_Calculated = "C"; 456 public static final String FREIGHTCOSTRULE_Line = "L"; 457 public void setFreightCostRule (String FreightCostRule) 458 { 459 if (FreightCostRule.equals("I") || FreightCostRule.equals("F") || FreightCostRule.equals("C") || FreightCostRule.equals("L")); 460 else throw new IllegalArgumentException ("FreightCostRule Invalid value - Reference_ID=153 - I - F - C - L"); 461 if (FreightCostRule == null) throw new IllegalArgumentException ("FreightCostRule is mandatory"); 462 setValue ("FreightCostRule", FreightCostRule); 463 } 464 public String getFreightCostRule() 465 { 466 return (String )getValue("FreightCostRule"); 467 } 468 void setGrandTotal (BigDecimal GrandTotal) 469 { 470 if (GrandTotal == null) throw new IllegalArgumentException ("GrandTotal is mandatory"); 471 setValueNoCheck ("GrandTotal", GrandTotal); 472 } 473 public BigDecimal getGrandTotal() 474 { 475 BigDecimal bd = (BigDecimal)getValue("GrandTotal"); 476 if (bd == null) return Env.ZERO; 477 return bd; 478 } 479 public static final String INVOICERULE_AfterOrderDelivered = "O"; 480 public static final String INVOICERULE_AfterDelivery = "D"; 481 public static final String INVOICERULE_CustomerScheduleAfterDelivery = "S"; 482 public static final String INVOICERULE_Immediate = "I"; 483 public void setInvoiceRule (String InvoiceRule) 484 { 485 if (InvoiceRule.equals("O") || InvoiceRule.equals("D") || InvoiceRule.equals("S") || InvoiceRule.equals("I")); 486 else throw new IllegalArgumentException ("InvoiceRule Invalid value - Reference_ID=150 - O - D - S - I"); 487 if (InvoiceRule == null) throw new IllegalArgumentException ("InvoiceRule is mandatory"); 488 setValue ("InvoiceRule", InvoiceRule); 489 } 490 public String getInvoiceRule() 491 { 492 return (String )getValue("InvoiceRule"); 493 } 494 void setIsApproved (boolean IsApproved) 495 { 496 setValueNoCheck ("IsApproved", new Boolean (IsApproved)); 497 } 498 public boolean isApproved() 499 { 500 Boolean bb = (Boolean )getValue("IsApproved"); 501 if (bb != null) return bb.booleanValue(); 502 return false; 503 } 504 void setIsCreditApproved (boolean IsCreditApproved) 505 { 506 setValueNoCheck ("IsCreditApproved", new Boolean (IsCreditApproved)); 507 } 508 public boolean isCreditApproved() 509 { 510 Boolean bb = (Boolean )getValue("IsCreditApproved"); 511 if (bb != null) return bb.booleanValue(); 512 return false; 513 } 514 void setIsDelivered (boolean IsDelivered) 515 { 516 setValueNoCheck ("IsDelivered", new Boolean (IsDelivered)); 517 } 518 public boolean isDelivered() 519 { 520 Boolean bb = (Boolean )getValue("IsDelivered"); 521 if (bb != null) return bb.booleanValue(); 522 return false; 523 } 524 public void setIsDiscountPrinted (boolean IsDiscountPrinted) 525 { 526 setValue ("IsDiscountPrinted", new Boolean (IsDiscountPrinted)); 527 } 528 public boolean isDiscountPrinted() 529 { 530 Boolean bb = (Boolean )getValue("IsDiscountPrinted"); 531 if (bb != null) return bb.booleanValue(); 532 return false; 533 } 534 void setIsInvoiced (boolean IsInvoiced) 535 { 536 setValueNoCheck ("IsInvoiced", new Boolean (IsInvoiced)); 537 } 538 public boolean isInvoiced() 539 { 540 Boolean bb = (Boolean )getValue("IsInvoiced"); 541 if (bb != null) return bb.booleanValue(); 542 return false; 543 } 544 void setIsPrinted (boolean IsPrinted) 545 { 546 setValueNoCheck ("IsPrinted", new Boolean (IsPrinted)); 547 } 548 public boolean isPrinted() 549 { 550 Boolean bb = (Boolean )getValue("IsPrinted"); 551 if (bb != null) return bb.booleanValue(); 552 return false; 553 } 554 public void setIsSOTrx (boolean IsSOTrx) 555 { 556 setValue ("IsSOTrx", new Boolean (IsSOTrx)); 557 } 558 public boolean isSOTrx() 559 { 560 Boolean bb = (Boolean )getValue("IsSOTrx"); 561 if (bb != null) return bb.booleanValue(); 562 return false; 563 } 564 public void setIsSelected (boolean IsSelected) 565 { 566 setValue ("IsSelected", new Boolean (IsSelected)); 567 } 568 public boolean isSelected() 569 { 570 Boolean bb = (Boolean )getValue("IsSelected"); 571 if (bb != null) return bb.booleanValue(); 572 return false; 573 } 574 public void setIsSelfService (boolean IsSelfService) 575 { 576 setValue ("IsSelfService", new Boolean (IsSelfService)); 577 } 578 public boolean isSelfService() 579 { 580 Boolean bb = (Boolean )getValue("IsSelfService"); 581 if (bb != null) return bb.booleanValue(); 582 return false; 583 } 584 public void setIsTaxIncluded (boolean IsTaxIncluded) 585 { 586 setValue ("IsTaxIncluded", new Boolean (IsTaxIncluded)); 587 } 588 public boolean isTaxIncluded() 589 { 590 Boolean bb = (Boolean )getValue("IsTaxIncluded"); 591 if (bb != null) return bb.booleanValue(); 592 return false; 593 } 594 void setIsTransferred (boolean IsTransferred) 595 { 596 setValueNoCheck ("IsTransferred", new Boolean (IsTransferred)); 597 } 598 public boolean isTransferred() 599 { 600 Boolean bb = (Boolean )getValue("IsTransferred"); 601 if (bb != null) return bb.booleanValue(); 602 return false; 603 } 604 public void setM_PriceList_ID (int M_PriceList_ID) 605 { 606 setValue ("M_PriceList_ID", new Integer (M_PriceList_ID)); 607 } 608 public int getM_PriceList_ID() 609 { 610 Integer ii = (Integer )getValue("M_PriceList_ID"); 611 if (ii == null) return 0; 612 return ii.intValue(); 613 } 614 public void setM_Shipper_ID (int M_Shipper_ID) 615 { 616 if (M_Shipper_ID == 0) setValue ("M_Shipper_ID", null); 617 else 618 setValue ("M_Shipper_ID", new Integer (M_Shipper_ID)); 619 } 620 public int getM_Shipper_ID() 621 { 622 Integer ii = (Integer )getValue("M_Shipper_ID"); 623 if (ii == null) return 0; 624 return ii.intValue(); 625 } 626 public void setM_Warehouse_ID (int M_Warehouse_ID) 627 { 628 setValue ("M_Warehouse_ID", new Integer (M_Warehouse_ID)); 629 } 630 public int getM_Warehouse_ID() 631 { 632 Integer ii = (Integer )getValue("M_Warehouse_ID"); 633 if (ii == null) return 0; 634 return ii.intValue(); 635 } 636 public void setPOReference (String POReference) 637 { 638 setValue ("POReference", POReference); 639 } 640 public String getPOReference() 641 { 642 return (String )getValue("POReference"); 643 } 644 public static final String PAYMENTRULE_Cash = "B"; 645 public static final String PAYMENTRULE_CreditCard = "K"; 646 public static final String PAYMENTRULE_TransferACH = "T"; 647 public static final String PAYMENTRULE_Check = "S"; 648 public static final String PAYMENTRULE_OnCredit = "P"; 649 public void setPaymentRule (String PaymentRule) 650 { 651 if (PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P")); 652 else throw new IllegalArgumentException ("PaymentRule Invalid value - Reference_ID=195 - B - K - T - S - P"); 653 if (PaymentRule == null) throw new IllegalArgumentException ("PaymentRule is mandatory"); 654 setValue ("PaymentRule", PaymentRule); 655 } 656 public String getPaymentRule() 657 { 658 return (String )getValue("PaymentRule"); 659 } 660 public void setPosted (boolean Posted) 661 { 662 setValue ("Posted", new Boolean (Posted)); 663 } 664 public boolean isPosted() 665 { 666 Boolean bb = (Boolean )getValue("Posted"); 667 if (bb != null) return bb.booleanValue(); 668 return false; 669 } 670 public static final String PRIORITYRULE_High = "3"; 671 public static final String PRIORITYRULE_Medium = "5"; 672 public static final String PRIORITYRULE_Low = "7"; 673 public void setPriorityRule (String PriorityRule) 674 { 675 if (PriorityRule.equals("3") || PriorityRule.equals("5") || PriorityRule.equals("7")); 676 else throw new IllegalArgumentException ("PriorityRule Invalid value - Reference_ID=154 - 3 - 5 - 7"); 677 if (PriorityRule == null) throw new IllegalArgumentException ("PriorityRule is mandatory"); 678 setValue ("PriorityRule", PriorityRule); 679 } 680 public String getPriorityRule() 681 { 682 return (String )getValue("PriorityRule"); 683 } 684 void setProcessed (boolean Processed) 685 { 686 setValueNoCheck ("Processed", new Boolean (Processed)); 687 } 688 public boolean isProcessed() 689 { 690 Boolean bb = (Boolean )getValue("Processed"); 691 if (bb != null) return bb.booleanValue(); 692 return false; 693 } 694 public void setProcessing (String Processing) 695 { 696 setValue ("Processing", Processing); 697 } 698 public String getProcessing() 699 { 700 return (String )getValue("Processing"); 701 } 702 public void setSalesRep_ID (int SalesRep_ID) 703 { 704 setValue ("SalesRep_ID", new Integer (SalesRep_ID)); 705 } 706 public int getSalesRep_ID() 707 { 708 Integer ii = (Integer )getValue("SalesRep_ID"); 709 if (ii == null) return 0; 710 return ii.intValue(); 711 } 712 public void setSendEMail (boolean SendEMail) 713 { 714 setValue ("SendEMail", new Boolean (SendEMail)); 715 } 716 public boolean isSendEMail() 717 { 718 Boolean bb = (Boolean )getValue("SendEMail"); 719 if (bb != null) return bb.booleanValue(); 720 return false; 721 } 722 void setTotalLines (BigDecimal TotalLines) 723 { 724 if (TotalLines == null) throw new IllegalArgumentException ("TotalLines is mandatory"); 725 setValueNoCheck ("TotalLines", TotalLines); 726 } 727 public BigDecimal getTotalLines() 728 { 729 BigDecimal bd = (BigDecimal)getValue("TotalLines"); 730 if (bd == null) return Env.ZERO; 731 return bd; 732 } 733 public void setUser1_ID (int User1_ID) 734 { 735 if (User1_ID == 0) setValue ("User1_ID", null); 736 else 737 setValue ("User1_ID", new Integer (User1_ID)); 738 } 739 public int getUser1_ID() 740 { 741 Integer ii = (Integer )getValue("User1_ID"); 742 if (ii == null) return 0; 743 return ii.intValue(); 744 } 745 public void setUser2_ID (int User2_ID) 746 { 747 if (User2_ID == 0) setValue ("User2_ID", null); 748 else 749 setValue ("User2_ID", new Integer (User2_ID)); 750 } 751 public int getUser2_ID() 752 { 753 Integer ii = (Integer )getValue("User2_ID"); 754 if (ii == null) return 0; 755 return ii.intValue(); 756 } 757 } 758 | Popular Tags |