cancel
Showing results for 
Search instead for 
Did you mean: 

GRPO DueDate Should Come as per Payment terms.

Former Member
0 Kudos

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??

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

hello Eirc,

Thank you for replay,

can you please explain me with one simple example..??

Former Member
0 Kudos

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