My Products
Help
iizy
CONTRIBUTOR ***

Transactions with credit and debit accounts

by iizy

We have the case where transactions with the debit account 100152  have been registered in Visma with the same credit and debit accounts. 

We're wondering what is the root cause because we don't deliver transactions via vouchers with both credit and debit accounts. 

 

Here is how the mutation looks like:

mutation VoucherCreate($companyId: Int) {
  useCompany(no: $companyId) {
    voucher_create( values: [
   {
  invoiceNo: "34537",
  customerNo: 0,
  cid: "*",
  creditTurnoverClass: 0,
  batchNo: 1234,
  lineNo: 1,
  voucherNo: 600088,
  voucherDateAsDate: "2024-08-16",
  valueDateAsDate: "2024-08-16",
  voucherType: 17,
  text: "Direktebet. av gebyr",
  creditAccountType: 3,
  creditAccountNo: 8055,
  amountDomestic: 150.0000000000000000000
},
{
  invoiceNo: "34537",
  customerNo: 0,
  cid: "*",
  creditTurnoverClass: 0,
  batchNo: 1234,
  lineNo: 2,
  voucherNo: 600088,
  voucherDateAsDate: "2024-08-16",
  valueDateAsDate: "2024-08-16",
  voucherType: 17,
  text: "Direktebet. av renter",
  creditAccountType: 3,
  creditAccountNo: 8055,
  amountDomestic: 7.1700000000000000000
},
{
  invoiceNo: "34537",
  crossReference: "34537",
  customerNo: 100152,
  cid: "10015200345375",
  batchNo: 1234,
  lineNo: 3,
  voucherNo: 600088,
  voucherDateAsDate: "2024-08-16",
  valueDateAsDate: "2024-08-16",
  voucherType: 17,
  text: "Renter/purregebyr faktura 34537",
  debitAccountType: 1,
  debitAccountNo: 100152,
  amountDomestic: 157.1700000000000000000
},
{
  invoiceNo: "34564",
  customerNo: 0,
  cid: "*",
  creditTurnoverClass: 0,
  batchNo: 1234,
  lineNo: 4,
  voucherNo: 600088,
  voucherDateAsDate: "2024-08-16",
  valueDateAsDate: "2024-08-16",
  voucherType: 17,
  text: "Direktebet. av renter",
  creditAccountType: 3,
  creditAccountNo: 8055,
  amountDomestic: 6.1000000000000000000
},
{
  invoiceNo: "34564",
  crossReference: "34564",
  customerNo: 100152,
  cid: "*",
  batchNo: 1234,
  lineNo: 5,
  voucherNo: 600088,
  voucherDateAsDate: "2024-08-16",
  valueDateAsDate: "2024-08-16",
  voucherType: 17,
  text: "Renter/purregebyr faktura 34564",
  debitAccountType: 1,
  debitAccountNo: 100152,
  amountDomestic: 6.1000000000000000000
},
{
  invoiceNo: "34578",
  customerNo: 0,
  cid: "*",
  creditTurnoverClass: 0,
  batchNo: 1234,
  lineNo: 6,
  voucherNo: 600088,
  voucherDateAsDate: "2024-08-16",
  valueDateAsDate: "2024-08-16",
  voucherType: 17,
  text: "Direktebet. av renter",
  creditAccountType: 3,
  creditAccountNo: 8055,
  amountDomestic: 3.2200000000000000000
},
{
  invoiceNo: "34578",
  crossReference: "34578",
  customerNo: 100152,
  cid: "*",
  batchNo: 1234,
  lineNo: 7,
  voucherNo: 600088,
  voucherDateAsDate: "2024-08-16",
  valueDateAsDate: "2024-08-16",
  voucherType: 17,
  text: "Renter/purregebyr faktura 34578",
  debitAccountType: 1,
  debitAccountNo: 100152,
  amountDomestic: 3.2200000000000000000
}
    ]) {
        affectedRows
        items { batchNo			
voucherNo			
voucherDate			
valueDate }
      }
   }
}

 

and the result:

iizy_0-1724936472921.png

 

Do you have a clue what might be wrong?

2 REPLIES 2
iizy
CONTRIBUTOR ***

by iizy

Maybe this happened because the delivered transaction contained customerNo: 100152 and debitAccountNo: 100152?

 

invoiceNo: "34578",
  crossReference: "34578",
  customerNo: 100152,
  cid: "*",
  batchNo: 1234,
  lineNo: 7,
  voucherNo: 600088,
  voucherDateAsDate: "2024-08-16",
  valueDateAsDate: "2024-08-16",
  voucherType: 17,
  text: "Renter/purregebyr faktura 34578",
  debitAccountType: 1,
  debitAccountNo: 100152,
  amountDomestic: 3.2200000000000000000

 

by Øyvind Årseth

Hi @iizy My suggestion is that this is due to the use of crossReference, which triggers a lookup in open customer entries, and fetches the corresponding customerno to credit. Hard to avoid I think, but you can cancel out the credit posting by sending in "creditAccount: 0" somewhere after crossReference. Keep in mind that the input sequence often matters in BNXT.