on 12-11-2013 9:18 AM
Hello Experts,
I have stuck up at one point,
I want to setup DueDate in GRPO & Delivery Date in Purchase Order as per Payment terms set in BP Master Data.
For Due Date in AP Invoice,Payment Terms are giving correct Date but in GRPO & PO it not giving any change menace
in PO & GRPO Due Date is same as Posting Date.
I am using SAP B1 8.80 SP 00 PL 10
How Can i do this??
Hi Santosh,
This is because values (dates) doesn't means the same thing: in a GRPO, the DueDate is supposed to be the date where to invoice, while in the invoice, the same value is supposed to be the date where payment as to be done by the BP and SBO is dealing (not a mistake) differently with both.
Your only solution, is a specific query, used as FMS, to recalculate the date of payment regarding the BP, its default conditions and the delivery date.
Besides this technical answer, the functional one would be to add a line on the delivery, stating that payment term is the invoice term... SO only have to modify the layout of the delivery and nothing on parameters
Regards,
Eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santosh,
These are just calculation around dates, nothing fancy:
DECLARE @GroupNum int
DECLARE @DocDate datetime
DECLARE @DocDueDate datetime
DECLARE @ExtraMonth int
DECLARE @ExtraDays int
DECLARE @PayDuMonth varchar(1)
SELECT @GroupNum = $[$47.0.0]
SELECT @DocDate = $[$10.0.Date]
SELECT @ExtraMonth = C0.ExtraMonth, @ExtraDays = C0.ExtraDays, @PayDuMonth = C0.PayDuMonth
, @DocDueDate = @DocDate
FROM OCTG C0 WHERE GroupNum = @GroupNum
IF @ExtraDays > 0
BEGIN
SELECT @DocDueDate = DATEADD(day, @ExtraDays, @DocDueDate)
END
IF @ExtraMonth > 0
BEGIN
SELECT @DocDueDate = DATEADD(month, @ExtraMonth, @DocDueDate)
END
IF @PayDuMonth = 'E'
BEGIN
SELECT @DocDueDate = DATEADD(month, 1, @DocDueDate)
SELECT @DocDueDate = DATEADD(day, -1 * DATEPART(day, @DocDueDate), @DocDueDate)
END
IF @PayDuMonth = 'H'
BEGIN
SELECT @ExtraDays = DATEPART(day, @DocDueDate)
IF @ExtraDays < 15
BEGIN
SELECT @DocDueDate = DATEADD(day, (-1 * (DATEPART(day, @DocDueDate) - 1)) + 14, @DocDueDate)
END
IF @ExtraDays > 15
BEGIN
SELECT @DocDueDate = DATEADD(month, 1, @DocDueDate)
SELECT @DocDueDate = DATEADD(day, (-1 * (DATEPART(day, @DocDueDate) - 1)) + 14, @DocDueDate)
END
END
IF @PayDuMonth = 'Y'
BEGIN
SELECT @DocDueDate = DATEADD(month, 1, @DocDueDate)
SELECT @DocDueDate = DATEADD(day, -1 * (DATEPART(day, @DocDueDate) - 1), @DocDueDate)
END
SELECT @DocDueDate
Regards,
Eric
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.