AP Invoice

Revision as of 09:37, 28 May 2018 by DanielY (talk | contribs) (Created page with "==Under Construction== ===Rules in APInvoice=== # AccNo (Purchase A/C) cannot be empty or null. # AccNo (Purchase A/C) cannot be Creditor Account No. # NetTotal cannot be in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Under Construction

Rules in APInvoice

  1. AccNo (Purchase A/C) cannot be empty or null.
  2. AccNo (Purchase A/C) cannot be Creditor Account No.
  3. NetTotal cannot be in negative value.
  4. NetTotal is the sum of amount & GST from details, this field is ReadOnly.
  5. Total GST is the sum of GST & GST Adjustment from details, this field is ReadOnly.

References of AutoCount Accounting version 1.8

BCE.AutoCount.dll
BCE.AutoCount.CommonAccounting.dll
BCE.AutoCount.MainEntry.dll
BCE.Utils.dll
BCE.Utils.UI.dll
BCE.AutoCount.ARAP.dll


API Usage

Sample

Create new AP Invoice

Classes of Source

public class APInvoiceSource
{
    public string SupplierCode { get; set; }
    public string Description { get; set; }
    public decimal CurrencyRate { get; set; } = 1;
    public string Document { get; set; }
    public DateTime Date { get; set; }
    public string PurchaseAgent { get; set; }
    public string JournalType { get; set; } = "PURCHASE";
    public BCE.AutoCount.Document.DocumentRoundingMethod RoundMethod { get; set; } =
        BCE.AutoCount.Document.DocumentRoundingMethod.LineByLine_Ver2;
    public bool Inclusive { get; set; } = false;
    public List<APInvoiceDetail> Details { get; set; } = new List<APInvoiceDetail>();
}

public class APInvoiceDetail
{
    public string Account { get; set; }
    public string Description { get; set; }
    public string Project { get; set; }
    public string Department { get; set; }
    public decimal? Amount { get; set; }
    public string GSTCode { get; set; }
    public decimal GSTAdjustment { get; set; }
}

Implementation

 

public void MainEntry(BCE.Data.DBSetting dbSetting)
{
    ARInvoiceSource newDoc = new ARInvoiceSource()
    {
        CustomerCode = "300-A001",
        Description = "SALES GENERATED",
        Document = "<<New>>",
        Date = new DateTime(2017, 11, 27),
        Inclusive = true
    };

    newDoc.Details.Add(new ARInvoiceDetail(){ Account = "500-0000", Description = "APPLE IPHONE X", Amount = 5000, GSTCode = "SR-S" });
    newDoc.Details.Add(new ARInvoiceDetail(){ Account = "520-0000", Description = "Discount 10%",   Amount = -500, GSTCode = "SR-S" });
    //No error while the Account is empty, because the amount is zero;
    //Hence no posting to account is required.
    newDoc.Details.Add(new ARInvoiceDetail(){                       Description = "GIFT",           Amount = 0,    GSTCode = "SR-S" });
    newDoc.Details.Add(new ARInvoiceDetail(){ Account = "500-0000", Description = "FREE Screen Protector",         GSTCode = "SR-S" });

    NewARInvoiceEntry(dbSetting, newDoc);
}

Template:SeeAlsoAccount

Go to menu

  Go to top
  Resources For AutoCount Software Developers