/*----------------------------------------------------------------------------
Copyright (c)2000 TogetherSoft Corporation. Patents pending. All rights reserved.
----------------------------------------------------------------------------*/

package MatlResMgmt.InvoiceFromSupplier;

import AccountingMgmt.Account.CostCenter;
import java.util.Vector;
import java.util.Date;
import java.math.BigDecimal;

/** 
 * @author TogetherSoft
 * @stereotype moment-interval */
public class InvoiceFromSupplier {
    public void enterInvoiceFromSupplier() {
    }

    public BigDecimal calcTotal() {
        if (total.intValue() == 0) {
            recalcTotal();
        }
        return total;
    }

    public BigDecimal recalcTotal() {
        // calc total and set total attribute
        return total;
    }

    public void post(CostCenter costCenter) {
    }

    /**  */
    public boolean mi_willPOBeExceeded() {
        return false;
    }

    public static Vector listInvoices() {
        return new Vector();
    }

    public static int calcAvgInvoice() {
        return 0;
    }

    private Date date;

    /**
     *@supplierCardinality 0..1
     *@supplierRole adjustment
     * @clientCardinality 0..1
     */
    private InvoiceFromSupplier lnkUnnamed2;
    private int terms;
    private int status;

    /**
     * @shapeType AggregationLink
     * @supplierCardinality 1..*
     * @clientCardinality 1
     */
    private InvoiceDetail lnkUnnamed3;

    /**
     *@clientCardinality 0..*
     *@supplierCardinality 0..*
     */
    private AccountingMgmt.Posting.Posting lnkUnnamed;

    /**
     *@supplierCardinality 0..*
     *@clientCardinality 0..*
     */
    private AccountingMgmt.Payment.Payment lnkUnnamed1;

    /** @supplierCardinality 1 */
    private IEnterInvoiceFromSupplier lnkUnnamed4;
    private BigDecimal total;
}


