Hello,
I've configured the payment terms as shown below, and when I utilize the /Calculate/ feature within the Payment Term setup window, it correctly computes the Due Date and discount date. However, when I employ the Dynamic GP stored procedure [taCalcDueDatePM] to perform the same calculation, it does not yield the correct results.
GO
@O_dDISCDATE datetime,
@O_dDUEDATE datetime,
@O_iErrorState int,
@oErrString varchar(255)
@I_vVENDORID = N'DM',
@I_vPYMTRMID = N'2% 10TH',
@I_vDOCDATE = N'10/19/2023',
@O_dDISCDATE = @O_dDISCDATE OUTPUT,
@O_dDUEDATE = @O_dDUEDATE OUTPUT,
@O_iErrorState = @O_iErrorState OUTPUT,
@oErrString = @oErrString OUTPUT
@O_dDUEDATE as N'@O_dDUEDATE',
@O_iErrorState as N'@O_iErrorState',
@oErrString as N'@oErrString'