0

I'm trying to add an OP with check payment with a primary form item but after saving the payment the chosen CFWid won't reflect in SAP but instead shows the default cash flow.

I have successfully added an OP with Bank Transfer Primary form items, using the code below (both using same GL account - with cash flow relevant checked.)

oPay.PrimaryFormItems.CashFlowLineItemID = Int32.Parse(row["CFWId"].ToString());

if (row["PaymentMen"].ToString() == "BTR")
{
    oPay.PrimaryFormItems.PaymentMeans = PaymentMeansTypeEnum.pmtBankTransfer;
}
else if (row["PaymentMen"].ToString() == "CHK")
{
    oPay.PrimaryFormItems.PaymentMeans = PaymentMeansTypeEnum.pmtChecks;
}
user16217248
  • 3,119
  • 19
  • 19
  • 37
riggs
  • 25
  • 3

1 Answers1

-2

Use this code

for (int c = 0; c < oPago.PrimaryFormItems.Count; c++) {
    oPago.PrimaryFormItems.SetCurrentLine(c);
    oPago.PrimaryFormItems.CashFlowLineItemID = PAFCId;
}
user16217248
  • 3,119
  • 19
  • 19
  • 37