Class MDocType

    • Constructor Detail

      • MDocType

        public MDocType​(Properties ctx,
                        int C_DocType_ID,
                        String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        C_DocType_ID - id
        trxName - transaction
      • MDocType

        public MDocType​(Properties ctx,
                        ResultSet rs,
                        String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MDocType

        public MDocType​(Properties ctx,
                        String DocBaseType,
                        String Name,
                        String trxName)
        New Constructor
        Parameters:
        ctx - context
        DocBaseType - document base type
        Name - name
        trxName - transaction
      • MDocType

        public MDocType​(MDocType copy)
        Parameters:
        copy -
    • Method Detail

      • getDocType

        public static int getDocType​(String DocBaseType)
        Return the first Doc Type for this BaseType
        Parameters:
        DocBaseType -
        Returns:
      • getOfDocBaseType

        public static MDocType[] getOfDocBaseType​(Properties ctx,
                                                  String DocBaseType)
        Get Client Document Type with DocBaseType
        Parameters:
        ctx - context
        DocBaseType - base document type
        Returns:
        array of doc types
      • getOfClient

        public static MDocType[] getOfClient​(Properties ctx)
        Get Client Document Types
        Parameters:
        ctx - context
        Returns:
        array of doc types
      • get

        public static MDocType get​(int C_DocType_ID)
        Get Document Type (cached) (immutable)
        Parameters:
        C_DocType_ID - id
        Returns:
        document type
      • get

        public static MDocType get​(Properties ctx,
                                   int C_DocType_ID)
        Get Document Type (cached) (immutable)
        Parameters:
        ctx - context
        C_DocType_ID - id
        Returns:
        document type
      • setGL_Category_ID

        public void setGL_Category_ID()
        Set Default GL Category
      • setIsSOTrx

        public void setIsSOTrx()
        Set SOTrx based on document base type
      • isQuotation

        public boolean isQuotation()
        Is this a Quotation (Binding)
        Returns:
        true if Quotation
      • isProposal

        public boolean isProposal()
        Is this a Proposal (Not binding)
        Returns:
        true if proposal
      • isOffer

        public boolean isOffer()
        Is this a Proposal or Quotation
        Returns:
        true if proposal or quotation
      • getPrintName

        public String getPrintName​(String AD_Language)
        Get Print Name
        Parameters:
        AD_Language - language
        Returns:
        print Name if available translated
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • afterSave

        protected boolean afterSave​(boolean newRecord,
                                    boolean success)
        After Save
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - new
        success - success
        Returns:
        success
      • beforeDelete

        protected boolean beforeDelete()
        Executed before Delete operation.
        Overrides:
        beforeDelete in class PO
        Returns:
        true if delete is a success
      • getShipmentReceiptDocType

        public static int getShipmentReceiptDocType​(int docTypeId)
        Returns Document type for the shipment/receipt based on Document type provided for order/rma
        Parameters:
        docTypeId -
        Returns:
        shipment/receipt doctype id
      • getNameTrl

        public String getNameTrl()
        Get translated doctype name
        Returns:
        Name if available translated