Package org.openbravo.materialmgmt
Class InvoiceGeneratorFromGoodsShipment
- java.lang.Object
-
- org.openbravo.materialmgmt.InvoiceGeneratorFromGoodsShipment
-
public class InvoiceGeneratorFromGoodsShipment extends Object
This class generates and processes Invoice from Goods Shipment. Only goods shipment lines not linked to a Sales Order, or from Sales Order with Invoice Term "After Delivery", "After Order Delivery" or "Immediate" are considered.
-
-
Constructor Summary
Constructors Constructor Description InvoiceGeneratorFromGoodsShipment(String shipmentId)
Creates anInvoiceGeneratorFromGoodsShipment
based only on shipment Id.InvoiceGeneratorFromGoodsShipment(String shipmentId, Date invoiceDate, PriceList priceList)
Creates anInvoiceGeneratorFromGoodsShipment
based on shipment IdInvoiceGeneratorFromGoodsShipment(String shipmentId, Date invoiceDate, PriceList priceList, String invoiceDocumentNo)
Creates anInvoiceGeneratorFromGoodsShipment
based on shipment Id
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Invoice
createInvoiceConsideringInvoiceTerms(boolean doProcessInvoice)
Creates a Sales Invoice from Goods Shipment, considering the invoice terms of available orders linked to the shipment lines.protected void
invoicePendingQtyForShipmentLine(ShipmentInOutLine shipmentLine, BigDecimal qtyToInvoice)
void
setAllowInvoicePOSOrder(boolean allowInvoicePOSOrder)
void
setEvictObjectOnCreation(boolean allowEvictObjectOnCreation)
-
-
-
Constructor Detail
-
InvoiceGeneratorFromGoodsShipment
public InvoiceGeneratorFromGoodsShipment(String shipmentId)
Creates anInvoiceGeneratorFromGoodsShipment
based only on shipment Id. The invoice date is taken from the shipment movement date, and the invoice price list is taken from shipment business partner- Parameters:
shipmentId
- The shipment Id
-
InvoiceGeneratorFromGoodsShipment
public InvoiceGeneratorFromGoodsShipment(String shipmentId, Date invoiceDate, PriceList priceList)
Creates anInvoiceGeneratorFromGoodsShipment
based on shipment Id- Parameters:
shipmentId
- The shipment IdinvoiceDate
- The invoice date. If null it takes the from the shipment movement date.priceList
- The invoice price list. If null it takes the business partner default
-
InvoiceGeneratorFromGoodsShipment
public InvoiceGeneratorFromGoodsShipment(String shipmentId, Date invoiceDate, PriceList priceList, String invoiceDocumentNo)
Creates anInvoiceGeneratorFromGoodsShipment
based on shipment Id- Parameters:
shipmentId
- The shipment IdinvoiceDate
- The invoice date. If null it takes the from the shipment movement date.priceList
- The invoice price list. If null it takes the business partner defaultinvoiceDocumentNo
- The invoice document number.
-
-
Method Detail
-
setAllowInvoicePOSOrder
public void setAllowInvoicePOSOrder(boolean allowInvoicePOSOrder)
-
setEvictObjectOnCreation
public void setEvictObjectOnCreation(boolean allowEvictObjectOnCreation)
-
createInvoiceConsideringInvoiceTerms
public Invoice createInvoiceConsideringInvoiceTerms(boolean doProcessInvoice)
Creates a Sales Invoice from Goods Shipment, considering the invoice terms of available orders linked to the shipment lines.- Parameters:
doProcessInvoice
- if true the invoice will be automatically processed, otherwise it will remain in draft status- Returns:
- The invoice created
-
invoicePendingQtyForShipmentLine
protected void invoicePendingQtyForShipmentLine(ShipmentInOutLine shipmentLine, BigDecimal qtyToInvoice)
-
-