|
Quotation
- Run Auto TransactionNo from RunningNumber
- Default Transaction Date By System Date
- VIEW & GET: Default Vat PercentTB TAXMaster
SELECT
TAXRate From TB TAXMaster WHERE TB TAXMaster.Local =
Populate.Corporate.LocalAddress and TAXMaster.TAXType = “VAT”
- VIEW & GET: Customer
SELECT Populate.Prefix +
Populate.FirstName + Populate.MiddleName + Populate.LastName + Populate.Suffix,
PopulateContract.ContractName, Corporation.Address, PopulateContract.PaymentTerm,
PopulateContract.CreditTerm FROM Populate, Corporation, PopulateContract WHERE QuotationHdr.Populate = PopulateContract.People
- VIEW & GET: Saleman
SELECT Prefix + FirstName +
MiddleName + LastName + Suffix FROM Populate WHERE QuotationHdr.Populate
= Member.Populate.Code
- VIEW & GET: Product TB Library -> LibrarySpec
SELECT
Unit FROM LibrarySpec
SELECT Price FROM PriceList WHERE
PriceList.Library = Product and PriceList.Level = EmployeeHistory.JobClass and
PriceList.PerUnit = Inventory.Unit
- VIEW & GET: Unit
SELECT Price FROM PriceList WHERE PriceList.Library = Product and PriceList.Level =
EmployeeHistory.JobClass and PriceList.PerUnit = Inventory.Unit * (SELECT
Rate FROM LibrarySpec WHERE Code = PriceList.PerUnit and
Relative = Library.Name)
- Balance: Verify inventory stock quantity
SELECT
sum(Quantity) From InventoryTransaction WHERE Original =
Original.Department and Code = Product and (TransactionType = “Receive” or
TransactionType = “Increase Adjust”) and (PriceDate <= Transaction Date) - SELECT sum(Quantity) From InventoryTransaction WHERE
Original = Original.Department and Code = Product and (TransactionType = “Issue” or
TransactionType = “Decrease Adjust”) and (PriceDate <= Transaction Date) - SELECT sum(RemainQuantity) From InventoryTransaction WHERE Original = Original.Department and Code = Product and
TransactionType = “Requisition”
If Sum InventoryTransaction >= Quantity then Pass
If Sum InventoryTransaction < Quantity
For Trading will display Ship Date = Purchase Order Date +
Inventory.LeadTime
For Factory will display Ship Date = Production Day for
on-hand Order and Production Day for Inprogress Order + Delivery Day
- Balance: Price
Verify price with pricelist.price, if price is less than
pricelist.price you must approve.
- Balance: Amount
Detail of product amount must <= Quantity * UnitPrice
( If Detail of Amount < Quantity * Price then Differencial Value is a discount )
- Balance: Discount Percent, GO Product Amount
- Balance: Vat Percent, GO Product Amount
- VIEW & GET: Freight Type and Insurance from TB surance
- Balance: Calculate Net Total Amount
- TotalAmount = Sum ( Detail of Amount )
- Discount Amount = ( Total Amount * Discount Percent ) / 100
- Vat Amount = (Total Amount - Discount Amount ) * Vat Percent / 100
- Net Total Amount = Total Amount - Discount Amount + Vat Amount
- Balance: Verify Credit Available
Credit Available = Credit Limit - Balance of
Invoice amount - Order onhand
PopulateContract.CreditLimit – (SELECT Sum(RemainAmount)
From BusinessInventoryTransactionDtl WHERE TransactionType =
"Invoice " + SELECT Sum(RemainAmount) From
BusinessLibraryTransactionDtl WHERE TransactionType =
"Invoice" – ( SELECT Sum(RemainAmount) From
BusinessInventoryTransactionDtl WHERE TransactionType = "Quotation"+
SELECT Sum(RemainAmount) From BusinessLibraryTransactionDtl WHERE TransactionType = “Quotation”)
If Amount > Credit Available must have an approval person.
- QUERY:
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, QuotationHdr.ContractName,
QuotationHdr.PaymentTerm, QuotationHdr.Credit, QuotationHdr.Saleman,
QuotationHdr.Approval, QuotationHdr.ShipVia, QuotationHdr.ShipDate,
QuotationHdr.Promotion, QuotationHdr.TotalAmount, QuotationHdr.DiscountPercent,
QuotationHdr.DiscountAmount, QuotationHdr.VatPercent, QuotationHdr.VatAmount,
QuotationHdr.NetTotalAmount, QuotationHdr.FreightType, QuotationHdr.FreightCorporation,
QuotationHdr.FreightAmount, QuotationHdr.InsuranceCorporation,
QuotationHdr.InsuranceAmount, QuotationHdr.CurrencyCode, QuotationHdr.BankOfGuarantee,
QuotationHdr.BranchOfBankGuarantee, QuotationHdr.GuaranteeNo, QuotationHdr.GuaranteeDate,
QuotationHdr.GuaranteeLimit, QuotationHdr.GuaranteePerson, QuotationHdr.Engineer,
QuotationHdr.Duration, QuotationDtl.Task, QuotationDtl.Duration, QuotationDtl.RangeOfTask
FROM TransactionHdr, BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl,
QuotationHdr, QuotationDtl
Order
- Run Auto TransactionNo from RunningNumber
- Default Transaction Date, Ship Date by System Date
- VIEW & GET: Quotation No from TB QuotationHdr -> QuotationDetail
SELECT QuotationHdr.Populate, Populate.Prefix + Populate.FirstName +
Populate.MiddleName + Populate.LastName + Populate.Suffix, PopulateContract.ContractName,
PopulateContract.Address, QuotationHdr.PaymentTerm, PopulateContract.CreditTerm,
QuotationHdr.Saleman, QuotationHdr.ShipVia, QuotationHdr.ShipDate, QuotationHdr.Currency,
QuotationHdr.FreightType, QuotationHdr.FreightAmount, QuotationHdr.InsuranceAmount,
QuotationHdr.TotalAmount, QuotationHdr.DiscountPercent, QuotationHdr.DiscountAmount,
QuotationHdr.VATPercent, QuotationHdr.VATAmount, QuotationHdr.NetTotalAmount ,
QuotationDtl.Library -> Inventory, Inventory.Name, QuotationDtl.Quantity,
QuotationDtl.Unit, QuotationDtl.UnitPrice, QuotationDtl.Amount FROM Populate,
PopulateContract, QuotationHdr, QuotationDtl
- VIEW & GET: Customer TB Populate -> Populate -> PopulateContract
SELECT Populate.Prefix + Populate.FirstName + Populate.MiddleName +
Populate.LastName + Populate.Suffix, PopulateContract.ContractName, Corporation.Address,
PopulateContract.PaymentTerm, PopulateContract.CreditTerm FROM Populate, PopulateContract,
Corporation WHERE OrderHdr.Populate = PopulateContract.Populate
- VIEW & GET: Saleman TB Populate -> Populate -> Employee
SELECT Prefix + FirstName + MiddleName + LastName + Suffix FROM
Populate WHERE OrderHdr.Populate=Member.Populate.Code
Default Due Date when key in credit Term and calculate by Order Date + credit term
- VIEW & GET: Product
SELECT Price From PriceList WHERE PriceList.Library = Product and PriceList. Level =
Employee.ApprovalLevel and PriceList.PerUnit = Inventory.Unit
- Balance: Unit
- Calculate price
- GO Calculate Total Amount
- GO verify credit available
- Balance: Quantity, verify inventory stock quantity
SELECT
sum(Quantity) From InventoryTransaction WHERE Original =
Original.Department and Code = Product and TransactionType = “Balance Forward” and
(PriceDate >= 1'st of Month of Order Date and PriceDate <= Order Date) + SELECT sum(Quantity) From InventoryTransaction WHERE
Original = Original.Department and Code = Product and (TransactionType = “Receive” or
TransactionType = “Increase Adjust”) and (PriceDate >= 1'st of Month of Order Date
and PriceDate <= Order Date) - SELECT sum(Quantity) From
InventoryTransaction WHERE Original = Original.Department and
Code = Product and (TransactionType = “Issue” or TransactionType = “Decrease Adjust”)
and (PriceDate >= 1'st of Month of Order Date and PriceDate <= Order Date) - SELECT sum(RemainQuantity) From InventoryTransaction WHERE Original = Original.Department and Code = Product and
TransactionType = “Requisition”
If Sum InventoryTransaction >= Quantity then Pass
If Sum InventoryTransaction < Quantity
For Trading will display Ship Date = Purchase Order Date +
Inventory.LeadTime
For Factory will display Ship Date = Production Day for
on-hand Order and Production Day for Inprogress Order + Delivery Day
GO Calculate Total Amount
GO verify credit available
- Balance: Price
- Verify price with pricelist.price, if price is less than pricelist.price you must
approve.
GO Calculate Total Amount
GO verify credit available
- Balance: Amount
Detail of product amount must <= Quantity * UnitPrice
( If Detail of Amount < Quantity * Price then Differencial Value is a discount )
- VIEW: Freight Type and Insurance from TB surance
- Balance: Discount Percent, GO Product Amount
- Balance: Vat Percent, GO Product Amount
- Balance: Amount
- Amout = quantity * Price
- TotalAmount = Sum ( Detail of Amount )
- Discount Amount = ( Total Amount * Discount Percent ) / 100
- Vat Amount = (Total Amount - Discount Amount ) * Vat Percent / 100
- Net Total Amount = Total Amount - Discount Amount + Vat Amount
- Balance: Verify Credit Available
Credit Available = Credit Limit - Balance of
Invoice amount - Order onhand
PopulateContract.CreditLimit – (SELECT Sum(RemainAmount)
From BusinessInventoryTransactionDtl WHERE TransactionType = “Invoice”+
SELECT Sum(RemainAmount) From BusinessLibraryTransactionDtl WHERE TransactionType = “Invoice”) – (SELECT
Sum(RemainAmount) From BusinessInventoryTransactionDtl WHERE
TransactionType = “Order”+ SELECT Sum(RemainAmount) From
BusinessLibraryTransactionDtl WHERE TransactionType =
“Order”)
If Amount > Credit Available must have an approval person.
- QUERY: SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, OrderHdr.PopulateAddress,
OrderHdr.ReferQuotation, OrderHdr.PaymentTerm, OrderHdr.Credit, OrderHdr.Saleman,
OrderHdr.Approval, OrderHdr.ShipVia, OrderHdr.ShipDate, OrderHdr.ShipAddress,
OrderHdr.Promotion, OrderHdr.DueDate, OrderHdr.LCBank, OrderHdr.LCNo, OrderHdr.LGNo,
OrderHdr.LGBank, OrderHdr.TotalAmount, OrderHdr.DiscountPercent, OrderHdr.DiscountAmount,
OrderHdr.VatPercent, OrderHdr.VatAmount, OrderHdr.NetTotalAmount, OrderHdr.FreightType,
OrderHdr.FreightCorporation, OrderHdr.FreightAmount, OrderHdr.InsuranceCorporation,
OrderHdr.InsuranceAmount, OrderHdr.CurrencyCode FROM TransactionHdr,
BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl, OrderHdr
Requisition
- Run Auto TransactionNo from RunningNumber
- Default Transaction Date by system Date
- VIEW & GET: Requisition Person from TB Populate -> Populate -> Employee
SELECT Prefix + FirstName + MiddleName + LastName + Suffix
FROM Populate
- VIEW & GET: Order No from TB OrderHdr -> OrderDetail
SELECT
OrderHdr.Populate, Populate.Prefix + Populate.FirstName + Populate.MiddleName +
Populate.LastName + Populate.Suffix, PopulateContract.ContractName,
PopulateContract.Address, OrderHdr.Saleman, OrderDtl.Library -> Inventory,
Inventory.Name, OrderDtl.Quantity, OrderDtl.Unit FROM Populate, PopulateContract,
OrderHdr, OrderDtl
- VIEW & GET: Customer TB Populate -> Populate -> PopulateContractx
SELECT Populate.Prefix + Populate.FirstName + Populate.MiddleName +
Populate.LastName + Populate.Suffix, PopulateContract.ContractName,
PopulateContract.Address, PopulateContract.PaymentTerm, PopulateContract.CreditTerm FROM
Populate, PopulateContract
- VIEW & GET: Saleman TB Populate -> Populate -> Employee
SELECT Prefix + FirstName + MiddleName + LastName + Suffix FROM
Populate
- VIEW & GET:Product
GET Field Unit Inventory.Unit, verify Inventory stock
SELECT sum(Quantity) From InventoryTransaction WHERE Original = Original.Department and Code = Product and
(TransactionType = “Receive” or TransactionType = “Increse Adjust”) and (PriceDate
<= Order Date) - SELECT sum(Quantity) From
InventoryTransaction WHERE Original = Original.Department and
Code = Product and (TransactionType = “Issue” or TransactionType = “Decrese Adjust”)
and (PriceDate <= Order Date) - SELECT sum(RemainQuantity)
From InventoryTransaction WHERE Original = Original.Department
and Code = Product and TransactionType = “Requisition”
- QUERY:
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, InventoryTransaction.ReferTransactionNo,
InventoryTransaction.ReferDocumentNo, InventoryTransaction.FromOriginal,
InventoryTransaction.ToOriginal, InventoryTransaction.FromDepartment,
InventoryTransaction.ToDepartment, InventoryTransaction.FromPerson,
InventoryTransaction.ToPerson, InventoryTransaction.Producer, InventoryTransaction.Price,
InventoryTransaction.Quantity, InventoryTransaction.Unit,
InventoryTransaction.InvoiceDate, InventoryTransaction.InvoiceDateNo,
InventoryTransaction.LotDate, InventoryTransaction.LotDateNo, InventoryTransaction.Cost,
InventoryTransaction.RemainQuantityByInvoice, InventoryTransaction.RemainQuantityByLot,
InventoryTransaction.RemainAmountByLot, InventoryTransaction.IssueDate,
InventoryTransaction.ExpiryDate, InventoryTransaction.DepreciationValue FROM
TransactionHdr, BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl,
InventoryTransaction
Issue
- Run Auto TransactionNo from RunningNumber
- Default Transaction Date by system Date
- VIEW & GET:Requisition PersonTB Populate -> Populate -> Employee
SELECT Prefix + FirstName + MiddleName + LastName + Suffix FROM
Populate
- VIEW & GET:Order No from TB OrderHdr -> OrderDetail
SELECT
OrderHdr.Customer, Populate.Prefix + Populate.FirstName + Populate.MiddleName +
Populate.LastName + Populate.Suffix, OrderHdr.Saleman, OrderDtl.Library -> Inventory,
OrderDtl.Quantity, OrderDtl.Unit FROM Populate, OrderHdr, OrderDtl
- VIEW & GET:Customer TB Populate -> Populate -> PopulateContract
Saleman
TB Populate -> Populate -> Employee
GET Prefix + FirstName + MiddleName + LastName + Suffix FROM Populate
- Balance: Product GET Field Unit = Inventory.Unit
Verify inventory stock
SELECT sum(Quantity) From InventoryTransaction WHERE Original = Original.Department and Code = Product and
(TransactionType = “Receive” or TransactionType = “Increase Adjust”) and
(PriceDate <= Issue Date) - SELECT sum(Quantity) From
InventoryTransaction WHERE Original = Original.Department and
Code = Product and (TransactionType = “Issue” or TransactionType = “Decrease Adjust”)
and (PriceDate <= Issue Date)
- QUERY: SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, InventoryTransaction.ReferTransactionNo,
InventoryTransaction.ReferDocumentNo, InventoryTransaction.FromOriginal,
InventoryTransaction.ToOriginal, InventoryTransaction.FromDepartment,
InventoryTransaction.ToDepartment, InventoryTransaction.FromPerson,
InventoryTransaction.ToPerson, InventoryTransaction.Producer, InventoryTransaction.Price,
InventoryTransaction.Quantity, InventoryTransaction.Unit,
InventoryTransaction.InvoiceDate, InventoryTransaction.InvoiceDateNo,
InventoryTransaction.LotDate, InventoryTransaction.LotDateNo, InventoryTransaction.Cost,
InventoryTransaction.RemainQuantityByInvoice, InventoryTransaction.RemainQuantityByLot,
InventoryTransaction.RemainAmountByLot, InventoryTransaction.IssueDate,
InventoryTransaction.ExpiryDate, InventoryTransaction.DepreciationValue FROM
TransactionHdr, BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl,
InventoryTransaction
Statement
- Run Auto TransactionNo from RunningNumber
- Default Transaction Date by System Date
- VIEW & GET: Order Date -> Reference -> TB OrderHdr
SELECT OrderHdr.TransactionNo, OrderHdr.Department, OrderHdr.Project,
OrderHdr.Populate, OrderHdr.TransactionDate, OrderHdr.PaymentTerm, OrderHdr.Credit,
OrderHdr.Saleman, OrderHdr.FreightType, OrderHdr.CurrencyCode, OrderDtl.Library,
OrderDtl.SerialNo, OrderDtl.Quantity, OrderDtl.WeightQuantity, OrderDtl.Unit,
OrderDtl.Price, OrderDtl.Amount FROM OrderHdr, OrderDtl
- Default Due Date when Key Credit Term and calculate from Order Date + Credit Term
- Balance: Quantity, Calculate Total amount, verify credit available
- Balance: Price
- Verify price with pricelist.price, if price is less than pricelist.price you must
approve.
GO Calculate Total Amount
GO verify credit available
- Balance: Amount
Detail of product amount must <= Quantity * UnitPrice
( If Detail of Amount < Quantity * Price then Differencial Value is a discount )
- VIEW & GET: Freight Type and Insurance from TB surance
Sum quantity * (SELECT Price From FreightInsurance WHERE
Original = Original.Department and From = Loading Port and To = Destination Port and
ViaType = Viatype and Library = Product)
- Balance: Discount Percent, GO Product Amount
- Balance: àÁ×èÍVat Percent, GO Product Amount, Credit available
- Balance: Amount
- Amout = quantity * Price
- TotalAmount = Sum ( Detail of Amount )
- Discount Amount = ( Total Amount * Discount Percent ) / 100
- Vat Amount = (Total Amount - Discount Amount ) * Vat Percent / 100
- Net Total Amount = Total Amount - Discount Amount + Vat Amount
- Balance: Credit Available
Credit Available = Credit Limit - Balance of Invoice
amount - Order onhand
PopulateContract.CreditLimit – (SELECT Sum(RemainAmount)
From BusinessInventoryTransactionDtl WHERE TransactionType = “Invoice”+
SELECT Sum(RemainAmount) From BusinessLibraryTransactionDtl WHERE TransactionType = “Invoice”) – (SELECT
Sum(RemainAmount) From BusinessInventoryTransactionDtl WHERE
TransactionType = “Order”+ SELECT Sum(RemainAmount) From
BusinessLibraryTransactionDtl WHERE TransactionType = “Order”)
- QUERY:
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, StatementHdr.ReferOrder,
StatementHdr.PaymentTerm, StatementHdr.Credit, StatementHdr.Saleman, StatementHdr.DueDate,
StatementHdr.TotalAmount, StatementHdr.DiscountPercent, StatementHdr.DiscountAmount,
StatementHdr.VatPercent, StatementHdr.VatAmount, StatementHdr.NetTotalAmount,
StatementHdr.FreightType, StatementHdr.FreightCorporation, StatementHdr.FreightAmount,
StatementHdr.InsuranceCorporation, StatementHdr.InsuranceAmount,
StatementHdr.CurrencyCode, StatementDtl.WeightQuantity FROM TransactionHdr,
BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl, StatementHdr, StatementDtl
Invoice
- Run Auto TransactionNo ¨Ò¡ RunningNumber
- Default Transaction Date, Ship Date By System Date
- VIEW & GET: Approval Person from Reference -> PeopleContract ->
Populate
SELECT Prefix + FirstName + MiddleName + LastName +
Suffix FROM Populate
- VIEW & GET: Ship Via from TB Library and calculate Freight Amount from TB
FreightInsurance
SELECT Price From PriceList WHERE PriceList.Library = Product and PriceList.ApprovalLevel =
Employee.ApprovalLevel and PriceList.PerUnit = Inventory.Unit
- VIEW & GET: Vehicle Name, Loading Port, Destination Port from Address
- VIEW & GET: Issuing No from TB InventoryTransaction
SELECT
InventoryTransaction.Customer, Populate.Prefix + Populate.FirstName + Populate.MiddleName
+ Populate.LastName + Populate.Suffix, PopulateContract.ContractName, Corporation.Address,
InventoryTransaction.FromPerson, InventoryTransaction.Library -> Inventory,
Inventory.Name, InventoryTransaction.Quantity, InventoryTransaction.Unit FROM
InventoryTransaction, Populate
SELECT OrderHdr.PaymentTerm, PopulateContract.CreditTerm,
OrderHdr.ShipVia, OrderHdr.ShipDate, OrderHdr.FreightType, OrderHdr.FreightAmount,
OrderHdr.InsuranceAmount, OrderDtl.UnitPrice, OrderDtl.Amount, OrderHdr.Currency FROM
OrderHdr, OrderDtl, PopulateContract
- VIEW & GET: Customer TB Populate -> Populate -> PopulateContract
SELECT Populate.Prefix + Populate.FirstName + Populate.MiddleName +
Populate.LastName + Populate.Suffix, PopulateContract.ContractName, Corporation.Address,
PopulateContract.PaymentTerm, PopulateContract.CreditTerm FROM PopulateContract, Populate,
Corporation
- VIEW & GET: Saleman TB Populate -> Populate -> Employee
SELECT Prefix + FirstName + MiddleName + LastName + Suffix FROM
Populate
- Default Due Date when Key Credit Term and calculate from Order Date + Credit Term
- Order No from Reference -> TB OrderHdr
SELECT
OrderHdr.TransactionDate, OrderHdr.Populate, OrderHdr.ShipDate, OrderHdr.ShipAddress,
OrderHdr.ShipVia, OrderHdr.Saleman, OrderHdr.PaymentTerm FROM OrderHdr
- VIEW & GET: Product TB Inventory -> Inventory
SELECT
Inventory.Name, Field Unit = Inventory.Unit FROM Inventory
GET Field Price FROM PriceList WHERE PriceList.Library =
Product and PriceList.ApprovalLevel = Employee.ApprovalLevel and PriceList.PerUnit =
Inventory.Unit
- VIEW & GET: Unit TB Library
- Balance: Quantity, calculate total amount, verify credit available
- Balance: Price
- Verify price with pricelist.price, if price is less than pricelist.price you must
approve.
GO Calculate Total Amount
GO verify credit available
- Balance: Amount
Detail of product amount must <= Quantity * UnitPrice
( If Detail of Amount < Quantity * Price then Differencial Value is a discount )
- Import / Export -> Reference -> Library
- VIEW & GET: Freight Type and Insurance from TB surance
Total
WeightQuantity * (SELECT PricePerWeight From FreightInsurance WHERE Original = FreightCorporate and From = Loading Port and To =
Destination Port and ViaType =ViaType Library = Product)
- Balance:Discount Percent, GO Product Amount
- Balance: Vat Percent, GO Product Amount, verify credit available
- Balance: Amount
- Amout = quantity * Price
- TotalAmount = Sum ( Detail of Amount )
- Discount Amount = ( Total Amount * Discount Percent ) / 100
- Vat Amount = (Total Amount - Discount Amount ) * Vat Percent / 100
- Net Total Amount = Total Amount - Discount Amount + Vat Amount
- Balance: Credit Available
Credit Available = Credit Limit - Balance of Invoice
amount - Order onhand
PopulateContract.CreditLimit – (SELECT Sum(RemainAmount)
From BusinessInventoryTransactionDtl WHERE TransactionType = “Invoice”+
SELECT Sum(RemainAmount) From BusinessLibraryTransactionDtl WHERE TransactionType = “Invoice”) – (SELECT
Sum(RemainAmount) From BusinessInventoryTransactionDtl WHERE
TransactionType = “Order+ SELECT Sum(RemainAmount) From
BusinessLibraryTransactionDtl WHERE TransactionType = “Order”)
If credit available not enough, must have approve person.
- QUERY: SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, InvoiceHdr.ReferOrder,
InvoiceHdr.ReferStatement, InvoiceHdr.ReferIssueNo, InvoiceHdr.PaymentTerm,
InvoiceHdr.CreditTerm, InvoiceHdr.Saleman, InvoiceHdr.Approval, InvoiceHdr.ShipVia,
InvoiceHdr.ShipDate, InvoiceHdr.ShipAddress, InvoiceHdr.DueDate, InvoiceHdr.VehicleName,
InvoiceHdr.LoadingPort, InvoiceHdr.DestinationPort, InvoiceHdr.CustomNo,
InvoiceHdr.CustomDate, InvoiceHdr.LcNo, InvoiceHdr.LcBank, InvoiceHdr.LGNo,
InvoiceHdr.LGBank, InvoiceHdr.LGPeople, InvoiceHdr.TotalAmount,
InvoiceHdr.DiscountPercent, InvoiceHdr.DiscountAmount, InvoiceHdr.VATPercent,
InvoiceHdr.VATAmount, InvoiceHdr.NetTotalAmount, InvoiceHdr.RemainAmount,
InvoiceHdr.FreightType, InvoiceHdr.FreightCorporation, InvoiceHdr.FreightAmount,
InvoiceHdr.InsuranceCorporation, InvoiceHdr.InsuranceAmount, InvoiceHdr.CurrencyCode,
InvoiceHdr.RangeOfLoan, InvoiceHdr.InterestLoan, InvoiceDtl.MarksOfExport,
InvoiceDtl.NoForExport, InvoiceDtl.ReferOrder, InvoiceDtl.WeightQuantity,
InvoiceDtl.TAXRate, InvoiceDtl.TAXAmount, InvoiceDtl.ExpiryDate FROM TransactionHdr,
BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl, InvoiceHdr, InvoiceDtlx
INSERT
INTO GL (µÒÁ GlPattern) VALUES Original, TransactionType, JournalNo, Library,
TransactionNo, TransactionDate, Department, Project, GLType, Amount
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, RunningNumber.Running, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project
Loop TransactionType = Invoice
SELECT GlPattern.AccountCode, GlPattern.GLType, Amount = SELECT Sum(InvoiceHdr.GlPattern.FieldName) From InvoiceHdr
From InvoiceHdr, GlPattern WHERE GlPattern.TransactionType =
Invoice
UPDATE PopulateContract (RemainCredit)
SET RemainCredit +
(SELECT NetTotalAmount FROM InvoiceHdr WHERE
Original = PopulateContract.Original and Department = PopulateContract.Department and
Customer = PopulateContract.ContractOriginal)
WHERE Original = PopulateContract.Original and Department =
PopulateContract.Department and Populate = PopulateContract.ContractOriginal
Billing
- Run Auto TransactionNo from RunningNumber
- Default Transaction Date by System Date
- VIEW & GET: Customer TB Populate -> Populate -> PopulateContract
SELECT Populate.Prefix + Populate.FirstName + Populate.MiddleName +
Populate.LastName + Populate.Suffix, PopulateContract.ContractName, Corporation.Address
FROM Populate, PopulateContract
- VIEW & GET: InvoiceNo -> Reference -> InvoiceHdr
SELECT
InvoiceHdr.Amount FROM InvoiceHdr WHERE InvoiceHdr.InvoiceNo =
Invoice no and TransactionHdr.Populate = InvoiceHdr.Populate
- QUERY:
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, BillingDetail.RecvChqDate,
BillingDetail.ReferInvoiceNo, BillingDetail.Amount FROM TransactionHdr,
BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl, BillingDetail
Recieve
- Run Auto TransactionNo ¨Ò¡ RunningNumber
- Default Transaction Date by system Date
- VIEW & GET: Default Vat PercentTB TAXMaster
SELECT
TAXRate From TB TAXMaster WHERE TB TAXMaster.Local =
People.Address and TAXMaster.TAXType = “VAT”
- VIEW & GET: Billing No Reference -> TB BillingDetail
SELECT
BillingDetail.Populate, BillingDetail.ReferInvoiceNo, BillingDetail.Amount FROM
BillingDetail
- Book Account, Recieve Type (Such as cash, cheque, credit card, deposit, on account),
Bank, Branch of Bank -> Reference -> Library
- VIEW & GET: Invoice no
SELECT InvoiceHdr.Amount
FROM InvoiceHdr WHERE InvoiceHdr.InvoiceNo = Invoice no
- Balance: Receive Amount
Total Amount = Sum Receive Amount
Vat Amount = ( Total Amount * Vat Percent ) / 100
Net Total Amount = Total Amount + Vat Amount
- QUERY:
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, ReceiveHdr.ReferBillingDetail,
ReceiveHdr.AccountBook, ReceiveHdr.FineAmount, ReceiveHdr.InterestPercent,
ReceiveHdr.InterestAmount, ReceiveHdr.TotalAmount, ReceiveHdr.DiscountPercent,
ReceiveHdr.DiscountAmount, ReceiveHdr.VatPercent, ReceiveHdr.VatAmount,
ReceiveHdr.NetTotalAmount, ReceiveDtl.ReferInvoiceNo, ReceiveDtl.PaymentType,
ReceiveDtl.DocumentType, ReceiveDtl.DocumentNo, ReceiveDtl.DocumentDate,
ReceiveDtl.DocumentBank, ReceiveDtl.DocumentBankBranch, ReceiveDtl.ApproveCode,
ReceiveDtl.Amount, ReceiveDtl.Currency FROM TransactionHdr, BusinessLibraryTransactionDtl,
BusinessInventoryTransactionDtl, ReceiveHdr, ReceiveDtl
INSERT INTO DocumentBank (Original, Populate, DocumentType, DocumentNo,
DocumentDate, DocumentBank, DocumentBankBranch, DocumentAmount, DocumentStatus,
CurrencyCode)
VALUES SELECT Original, Customer, Bank Document Type (Such as
Cheque, Credit Card, L/C) Bank Document No, Bank Document Date, Bank, Branch of Bank, (SELECT Sum(Amount) From ReceiveDtl WHERE
PaymentType = Bank Document Type, Group By DocumentNo), O-Onhand, Currency FROM ReceiveDtl
WHERE Receive Type = Bank Document Type and Original = Original
and Department = Department
INSERT INTO DocumentBankTrans
VALUES (Original, TransactionType, TransactionNo, DocumentType, DocumentNo,
Populate, ReferDocumentNo, ReferDocumentDate, Amount)
SELECT Original, “Receive Cheque ", Transaction, Bank
Document Type, Bank Document No, Bank Document Date, Customer, Invoice No, Invoice Date
(SELECT Sum(Amount) From ReceiveDtl WHERE
PaymentType = Bank Document Type Group By DocumentNo, ReferInvoiceNo) FROM ReceiveDtl
WHERE Receive Type = Bank Document Type and Original =
Original and Department = Department and InvoiceNo = Invoice No
INSERT INTO GL (from TB GlPattern)
VALUES Original, TransactionType, JournalNo, Library, TransactionNo, TransactionDate,
Department, Project, GLType, Amount
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, RunningNumber.Running, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project
Loop TransactionType = Receive
SELECT GlPattern.AccountCode, GlPattern.GLType, Amount = SELECT Sum(GlPattern.FieldName) From GlPattern.FieldName WHERE GlPttern.FieldCondition = Value From ReceiveHdr, ReceiveDtl,
GlPattern WHERE GlPattern.TransactionType = Receive
UPDATE PopulateContract (RemainCredit)
SET RemainCredit +
(SELECT Amount FROM ReceiveDtl WHERE
Original = PopulateContract.Original and Department = PopulateContract.Department and
Populate = PopulateContract.ContractOriginal) WHERE Original =
PopulateContract.Original and Department = PopulateContract.Department and Populate =
PopulateContract.ContractOriginal
Sale Debit Note / Credit Note
- Run Auto TransactionNo ¨Ò¡ TB RunningNumber
- Default Transaction Date, Duedate by System Date
- VIEW & GET: Default Vat PercentTB TAXMaster
SELECT
TAXRate From TB TAXMaster WHERE TB TAXMaster.Local =
People.Address and TAXMaster.TAXType = “VAT”
- VIEW & GET: Supplier TB Populate -> Populate -> PopulateContract
SELECT Populate.Prefix + Populate.FirstName + Populate.MiddleName +
Populate.LastName + Populate.Suffix, Corporation.Address FROM Populate, Corporation
- VIEW & GET: Reason of Debit Note / Credit Note from TB Reference ->
Library
- Balance: Invoice No from TB InvoiceDetail
SELECT Library, Unit, Quantity, UnitPrice, Amount From
InvoiceDetail
- VIEW & GET & Balance: Product TB Inventory, Library
GET Field Product = Inventory.Name, Field Unit= Inventory.Unit
SELECT Unit, Quantity, UnitPrice, Amount From InvoiceDetail
- Calculate Net Total Amount
- Verify credit available
- Balance: Unit TB Library
- Calculate Net Total Amount
- Verify credit available
- Balance: Quantity must less than or equal Invoice quantity
- Balance: Price
- Verify price with pricelist.price, if price is less than pricelist.price you must
approve.
GO Calculate Total Amount
GO verify credit available
- Calculate Net Total Amount
- Verify Credit Available
- Balance: Vat Percent
- Calculate Net Total Amount
- Verify Credit Available
- Balance: Calculate Product Amount
- Total Amount = SELECT Sum(Amount) From InvoiceDtl WHERE TransactionNo = Invoice
- Total Amount = Sum Amount in detail
- Difference = Amount of Old Purchase Invoice - New Amount
- Vat Amount = ( Difference * Vat Percent ) / 100
- Net Total Amount = Total Amount + Vat Amount
- Balance: Verify Credit Available
Credit Available = Credit Limit - Balance of invoice amount - Order onhan amount -
Debit Note
PopulateContract.CreditLimit – ( SELECT Sum(RemainAmount)
From BusinessInventoryTransactionDtl WHERE TransactionType = “Invoice”+
SELECT Sum(RemainAmount) From BusinessLibraryTransactionDtl WHERE TransactionType = “Invoice”) – (SELECT
Sum(RemainAmount) From BusinessInventoryTransactionDtl WHERE
TransactionType = “Order”+ SELECT Sum(RemainAmount) From
BusinessLibraryTransactionDtl WHERE TransactionType = “Order)
If Amount > Credit Available must have an approval person.
- QUERY: SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, DnCnHdr.Reason, DnCnHdr.TotalAmount,
DnCnHdr.DiscountPercent, DnCnHdr.DiscountAmount, DnCnHdr.VATPercent, DnCnHdr.VATAmount,
DnCnHdr.NetTotalAmount, DnCnHdr.CurrencyCode, DnCnDtl.ReferInvoiceNo, DnCnDtl.Quantity,
DnCnDtl.DnCnAmount, DnCnDtl.Unit, DnCnDtl.OldPrice, DnCnDtl.NewPrice FROM TransactionHdr,
BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl, DnCnHdr, DnCnDtl
Pay-In Cheque
- Run Auto TransactionNo ¨Ò¡ TB RunningNumber
- Default Transaction Date by System Date
- VIEW & GET: cheque No from TB DocumentBank SELECT
Original, Populate, AccountCheque, DocumentType, DocumentNo, DocumentDate, DocumentBank,
DocumentBanakBranch, DocumentAmount, Currency FROM DocumentBank WHERE
DocumentStatus = “OnHand”
- QUERY: SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, DocumentBankTrans.DocumentType,
DocumentBankTrans.DocumentNo, DocumentBankTrans.Populate,
DocumentBankTrans.ReferDocumentNo, DocumentBankTrans.ReferDocumentDate,
DocumentBankTrans.Amount, DocumentBankTrans.BankAccount, DocumentBankTrans.CurrencyCode
FROM TransactionHdr, BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl,
DocumentBankTrans
Return Cheque
- Run Auto TransactionNo ¨Ò¡ RunningNumber
- Default Transaction Date by System Date
- VIEW & GET: Cheque No from TB DocumentBank
SELECT Original, Populate, AccountCheque, DocumentType,
DocumentNo, DocumentDate, DocumentBank, DocumentBanakBranch, DocumentAmount, Currency FROM
DocumentBank WHERE DocumentStatus = “OnHand”
- QUERY: SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, DocumentBankTrans.DocumentType,
DocumentBankTrans.DocumentNo, DocumentBankTrans.Populate,
DocumentBankTrans.ReferDocumentNo, DocumentBankTrans.ReferDocumentDate,
DocumentBankTrans.Amount, DocumentBankTrans.Reason, DocumentBankTrans.BankAccount,
DocumentBankTrans.CurrencyCode FROM TransactionHdr, BusinessLibraryTransactionDtl,
BusinessInventoryTransactionDtl, DocumentBankTrans
Sale Cheque
- Run Auto TransactionNo ¨Ò¡ RunningNumber
- Default Transaction Date by System Date
- VIEW & GET: Cheque No from TB DocumentBank
SELECT
Original, Populate, AccountCheque, DocumentType, DocumentNo, DocumentDate, DocumentBank,
DocumentBankBranch, DocumentAmount, Currency FROM DocumentBank WHERE
DocumentStatus = “OnHand”
- QUERY:
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, DocumentBankTrans.DocumentType,
DocumentBankTrans.DocumentNo, DocumentBankTrans.Populate,
DocumentBankTrans.ReferDocumentNo, DocumentBankTrans.ReferDocumentDate,
DocumentBankTrans.Amount, DocumentBankTrans.Reason, DocumentBankTrans.Percent,
DocumentBankTrans.BankAccount, DocumentBankTrans.CurrencyCode FROM TransactionHdr,
BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl, DocumentBankTrans
UPDATE DocumentBank SET DocumentStatus = “OnHand”
Change Cheque
- Original.Department
- Project Reference -> Project -> ProjectAccount
- Run Auto TransactionNo
- Default Transaction by System Date
- Cheque No from TB DocumentBank
SELECT Original, Populate,
AccountCheque, DocumentType, DocumentNo, DocumentDate, DocumentBank, DocumentBankBranch,
DocumentAmount, Currency From DocumentBank WHERE DocumentStatus
= “OnHand”
- QUERY:
SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, DocumentBankTrans.DocumentType,
DocumentBankTrans.DocumentNo, DocumentBankTrans.Populate,
DocumentBankTrans.ReferDocumentNo, DocumentBankTrans.ReferDocumentDate,
DocumentBankTrans.Amount, DocumentBankTrans.Reason, DocumentBankTrans.Percent,
DocumentBankTrans.PaymentType, DocumentBankTrans.NewDocumentType,
DocumentBankTrans.NewDocumentNo, DocumentBankTrans.NewDocumentDate,
DocumentBankTrans.NewDocumentBank, DocumentBankTrans.ApproveCode,
DocumentBankTrans.BankAccount, DocumentBankTrans.CurrencyCode FROM TransactionHdr,
BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl, DocumentBankTrans
INSERT INTO DocumentBank (Original, Populate, DocumentType, DocumentNo,
DocumentDate, DocumentBank, DocumentBankBranch, DocumentAmount, DocumentStatus,
CurrencyCode)
VALUES
SELECT Original, Customer, Bank Document Type (Such as
Cheque, Credit), Bank Document No, Bank Document Date, Bank, Branch of bank (SELECT Sum(Amount) From ReceiveDtl WHERE
PaymentType = Cheque Group By DocumentNo), O-Onhand, Currency FROM ReceiveDtl
WHERE Receive Type = Bank Document Type and Original =
Original and Department = Department
INSERT INTO DocumentBankTrans
VALUES (Original, TransactionType, TransactionNo, DocumentType, DocumentNo, Populate,
ReferDocumentNo, ReferDocumentDate, Amount)
SELECT Original, “Receive Cheque", Transaction No,
Document Type, Document No, Customer, Invoice No, Invoice Date, (SELECT
Sum(Amount) From ReceiveDtl WHERE PaymentType = Bank Document
Type Group By DocumentNo, ReferInvoiceNo) FROM ReceiveDtl
WHERE Recieve Type = Bank Document Type and Original =
Original and Department = Department and Transaction No = InvoiceNo
Sale Return
- Run Auto TransactionNo ¨Ò¡ Running Number
- Default Transaction Date by System Date
- VIEW & GET: Default Currency from Original.License -> Populate
SELECT LibrarySpec.Amount FROM LibrarySpec WHERE
Date = get last date and Code = Populate.People.Address
- VIEW & GET: Invoice No from TB InvoiceHdr -> InvoiceDtl
SELECT InvoiceHdr.Customer, Populate.Prefix + Populate.FirstName +
Populate.MiddleName + Populate.LastName + Populate.Suffix, Corporation.Address,
InvoiceHdr.Saleman, InvoiceHdr.Currency, InvoiceDtl.Library -> Library, Library.Name,
InvoiceDtl.SerialNo -> Inventory, Inventory.Name, InvoiceDtl.Quantity, InvoiceDtl.Unit,
InvoiceDtl.UnitPrice, InvoiceDtl.Amount
Verify each product must have Invoice no
Verify return quantity is less than or equal invoice quantity
- Customer -> TB Populate -> Populate -> PopulateContract
SELECT Prefix + FirstName + MiddleName +LastName + Suffix
FROM Populate
- QUERY: SELECT TransactionHdr.Original,
TransactionHdr.TransactionType, TransactionHdr.TransactionNo,
TransactionHdr.TransactionDate, TransactionHdr.Department, TransactionHdr.Project,
TransactionHdr.Populate, TransactionHdr.DataRemark, BusinessLibraryTransactionDtl.Library,
BusinessLibraryTransactionDtl.Quantity, BusinessLibraryTransactionDtl.RemainQuantity,
BusinessLibraryTransactionDtl.Amount, BusinessLibraryTransactionDtl.RemainAmount,
BusinessInventoryTransactionDtl.Inventory, BusinessInventoryTransactionDtl.Amount,
BusinessInventoryTransactionDtl.RemainAmount, InventoryTransaction.ReferTransactionNo,
InventoryTransaction.ReferDocumentNo, InventoryTransaction.FromOriginal,
InventoryTransaction.ToOriginal, InventoryTransaction.FromDepartment,
InventoryTransaction.ToDepartment, InventoryTransaction.FromPerson,
InventoryTransaction.ToPerson, InventoryTransaction.Producer, InventoryTransaction.Price,
InventoryTransaction.Quantity, InventoryTransaction.Unit,
InventoryTransaction.InvoiceDate, InventoryTransaction.InvoiceDateNo,
InventoryTransaction.LotDate, InventoryTransaction.LotDateNo, InventoryTransaction.Cost,
InventoryTransaction.RemainQuantityByInvoice, InventoryTransaction.RemainQuantityByLot,
InventoryTransaction.RemainAmountByLot, InventoryTransaction.IssueDate,
InventoryTransaction.ExpiryDate, InventoryTransaction.DepreciationValue FROM
TransactionHdr, BusinessLibraryTransactionDtl, BusinessInventoryTransactionDtl,
InventoryTransaction
UPDATE OrderDtl (ReturnQuantity) SET ReturnQuantity -
Quantity
Last update : Monday, 7 January 2002 07:00 ( Thailand )
Apple, Mac, iMac, iPhone and iPod are trademarks of Apple, Inc.
Jini, Java and all Java-based are trademarks of Oracle Corporation.
JiniSoft Corporation
Copyright @ 1990 - 2012 Mr. Roongroj Rojanapo ( )
89/1 Khao Lam Road, Saen Suk, Chon buri District, Chon buri 20130, Thailand
|