My Products
Help
Quan Pham
PARTNER

Create customerPayment error

by Quan Pham

Hi,

 

I'm trying to create a customerPayment with the following json. 

{
  "branch": {
    "Value": "23"
  },
  "currency": {
    "Value": "SEK"
  },
  "customer": {
    "Value": "10052"
  },
  "type": {
    "Value": "Payment"
  },
  "paymentRef": {
    "Value": "Test"
  },
  "cashAccount": {
    "Value": "0123"
  },
  "paymentMethod": {
    "Value": "04"
  },
  "paymentAmount": {
    "Value": 203000.0
  },
  "paymentLines": [
    {
      "refNbr": {
        "Value": "UNI19000210"
      },
      "documentType": {
        "Value": "Invoice"
      },
      "amountPaid": {
        "Value": 203000.0
      },
      "operation": "Insert"
    }
  ]
}

 

I'm getting the error below. Do you have any idea why?

{
    "message": "VismaId: ac1cb44c-f13e-4cd1-94c7-80df161d60f1. Error creating payment Error: Inserting  'Customer payment' record raised at least one error. Please review the errors.\r\nError: Cash account '6891' cannot found in the system. Check whether you have access rights to this object.\r\nLast reference number customers\r\n"
}

 

2 REPLIES 2
Yıldırım
VISMA

by Yıldırım

Hello,

the Cash Account ID "6891" shown in the error message is the Account ID of the cash account you've used in the payload

  "cashAccount": {
    "Value": "0123"
  },

This can be found at Chart of accounts(ScreenId=GL202500) 

2accountID.jpg

 

When it comes to the error, apparently you don't have access to that account via the 

  "branch": {
    "Value": "23"
  },

 

In order to be able to Create a Customer Payment with specific PaymentMethod and Cash Account, 

Cash Account/s that you'd like to use with "CustomerPaymentMethod" should be defined under the Payment methods:"Allowed Cash Accounts" in Financials ERP ScreenId=CA204000 regardless of what branch is in use.

paymentMethods.png
then this cash account can be selected when creating a customerPaymentMethod.

cpaymentmethod.png

 

Regarding having multiple branches in your company and if those accounts are defined as branch-specific, 

Please make sure that "Multi-branch" and "Inter-branch transactions" are active in your licence and enabled in the Financials ERP company.
Enable_disable functionalities.png

 

Afterward, go to desired "Cash Account" screenID:CA2020PL and set "restrict visibility with branch : false"

cashaccount_restrictvisibility.png

by Magnus Johnsen

Hi,

Could you please make sure that the cash account is activated in the UI(ScreenId=CA2020PL):

2022-11-15 10_42_07-Cash accounts - Brave.png

Doubleclick the account and make sure that it is active for the customer ledger:

2022-11-15 10_44_32-Settings.png