Hi,
Getting Previous All Invoice/Delivery Note Dates in Sales Order
Getting Previous All Invoice Dates in Sales Order
public str lastAllInvoiceDates(SalesTable _salesTable)
{
CustInvoiceSalesLink custInvoiceSalesLink;
str invDates;
while select invoicedate From custInvoiceSalesLink
Index Hint origSalesIdx
Where custInvoiceSalesLink.OrigSalesId == _salesTable.SalesId
{
invDates = invDates + " " + date2Str(custInvoiceSalesLink.invoiceDate, 321,
DateDay::Digits2,
DateSeparator::Hyphen, // separator1
DateMonth::Digits2,
DateSeparator::Hyphen, // separator2
DateYear::Digits4);
}
return invDates;
}
Getting Previous All Delivery Note Dates in Sales Order
public str lastAllDNDates(SalesTable _salesTable)
{
CustPackingSlipSalesLink custPackingSlipSalesLink;
str lastDNDates;
while select DeliveryDate From custPackingSlipSalesLink
Index Hint origSalesIdx
Where custPackingSlipSalesLink.OrigSalesId == _salesTable.SalesId
{
lastDNDates = lastDNDates + " " + date2Str(custPackingSlipSalesLink.DeliveryDate, 321,
DateDay::Digits2,
DateSeparator::Hyphen, // separator1
DateMonth::Digits2,
DateSeparator::Hyphen, // separator2
DateYear::Digits4);
}
return lastDNDates;
}
Getting Last Invoiced Date
_tempTmp.lastInvoiceDate = (Select Maxof(InvoiceDate)
From custInvoiceTrans
Where custInvoiceTrans.InventTransId == salesLine.InventTransId).InvoiceDate;
Getting Last Delivered Date
_tempTmp.lastPackingSlipDate= (Select maxof(DeliveryDate)
From custPackingSlipTrans
Index Hint PackingSlipIdx
Where custPackingSlipTrans.InventTransId == salesLine.InventTransId).DeliveryDate;
Your way of writing and making things clear is very impressive. Looking forward to post more blog like this software development in chennai
ReplyDelete