Class OrderBaseERP

    • Field Detail

      • quotationPredecessorDocument

        protected ConnectedDocument quotationPredecessorDocument
        When the order is created with a reference to a quotation, the following reads of the order do not return docflow entries as long as the order was not saved. Thus we remember the Predecessor Quotation here, until the order has been saved, so we can properly fill the predecessor list for the reads before the order was saved.
    • Constructor Detail

      • OrderBaseERP

        public OrderBaseERP()
    • Method Detail

      • saveInBackend

        public boolean saveInBackend​(Order ordr,
                                     boolean commit)
                              throws BackendException
        Saves the order in the backend.
        The order will be saved in the backend.
        Specified by:
        saveInBackend in interface OrderBaseBackend
        Parameters:
        ordr - The order to be saved
        commit - The transaction should also be commited
        Returns:
        true if the save in the back end was successful.
        Throws:
        BackendException - in case of a back-end error
      • saveOrder

        protected boolean saveOrder​(Order ordr,
                                    boolean commit)
                             throws BackendException
        Saves the order in the backend and returns, if it was successufull.
        Parameters:
        ordr -
        commit -
        Returns:
        true, if save was successfull, false otherwise
        Throws:
        BackendException
      • saveOrderInBackend

        public int saveOrderInBackend​(Order ordr,
                                      boolean commit)
                               throws BackendException
        Copies the basket object to the order object
        Parameters:
        ordr - Order document
        commit - Flag controlling DB commit in back end
        Returns:
        0, if success, otherwise -1
        Throws:
        BackendException - in case of a back-end error
      • isCancelable

        public boolean isCancelable​(Order order)
        The ERP order can be canceled if the overall status is opened or if the overall status is in process , but not shipped, not billed and no delivery created for the any position can be cancelled. This can happened if the credit check is switched off for instance. The credit check is performed for the order and set order status "in process". But order can be cancelled in this case
        Specified by:
        isCancelable in interface OrderBaseBackend
        Parameters:
        order - Order which is checked
        Returns:
        true if order is cancelable