Error incomming payment cash

Hi
I have a problem when create a incoming payment from customer
creating  journal entry, payment, and add the journal entry on the payment
if the invoice is partially paid the payment is created sucessfully
but if the invoice is not paid send a error
error code:-10
description:Enter valid code  [JDT1.ContraAct][line: 1] , 'SN0001'  [??????? 173-36]
here ir the code:
                    //creating journal entry
                    var entry = company.GetBusinessObject(BoObjectTypes.oJournalEntries) as JournalEntries;
                    var cuenta = parametros.CodigoCuentaContableAnticiposClienteExportacion;
                    entry.TaxDate = pago.FechaCreacion;
                    entry.ReferenceDate = pago.FechaCreacion;
                    entry.DueDate = pago.FechaCreacion;
                    entry.Reference = "Aplic Anticipo cliente";
                    entry.Memo = "Aplic ANTICIPO CLIENTE";
                    entry.Reference2 = pago.Codigo.ToString();
                    entry.Lines.ShortName = pago.ClientePago.CardCode;
                    entry.Lines.Credit = (double)pago.Anticipado;
                    entry.Lines.TaxDate = entry.TaxDate;
                    entry.Lines.Add();
                    entry.Lines.SetCurrentLine(1);
                    entry.Lines.ShortName = cuenta;
                    entry.Lines.Debit = (double)pago.Anticipado;
                    entry.Lines.TaxDate = entry.TaxDate;
                    var statusPoliza = entry.Add();
                    if (statusPoliza != 0)
                        return;
                    var polizaAnticipo = company.GetNewObjectKey();
                    //creating payment
                    var payment = company.GetBusinessObject(BoObjectTypes.oIncomingPayments) as Payments;
                    payment.CardCode = client;
                    payment.DocDate = pago.FechaCreacion;
                    payment.DocType = BoRcptTypes.rCustomer;
                    payment.DocCurrency = "MXP"
                    var remarks = pago.PagoFacturas.Aggregate<PagoFactura, string>("",(folios, factura) => folios += "," + FolioImpreso).Substring(1);
                    if (remarks.Length > 50)
                        remarks = remarks.Substring(0, 47) + "...";
                    payment.JournalRemarks = remarks;
                    payment.Remarks = pago.Observaciones.Substring(0, pago.Observaciones.Length >= 254 ? 253 : pago.Observaciones.Length);
                    var pagar = pago.MontoPago
                    payment.CashAccount = pago.TipoMercado == TipoMercado.Exportacion ? "_SYS00000000123" : CodigoCuentaContableRedondeo;
                    payment.CashSum = (double)0.01;                   
                    var line = 0;
                    foreach (var pagoFactura in pago.PagoFacturas)
                        var factura = pagoFactura.FacturaCliente;
                        var folio = "";
                        var monto = 0m;
                        folio = factura.FolioSAP;
                        monto = pagoFactura.Monto
                         if (line != 0)
                            payment.Invoices.Add();
                        payment.Invoices.DocEntry = int.Parse(folio);
                        payment.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice; //BoRcptInvTypes.it_JournalEntry Así se indica que es una poliza
                        payment.Invoices.SumApplied = (double)monto;
                        line++;
                         // add the journal entry on the payment
                        if (line != 0)
                            payment.Invoices.Add();
                        payment.Invoices.DocEntry = int.Parse(polizaAnticipo);
                        payment.Invoices.InvoiceType = BoRcptInvTypes.it_JournalEntry; //Así se indica que es una poliza
                        payment.Invoices.SumApplied = -(double)pago.Anticipado;
                        line++;
                    var status = payment.Add();
I hope that you can help me
i'm usgin .net and DI API 9.0

Gracias por la respuesta alejandro
realmente no es SN0001, lo puse solo de ejemplo
pero el error lo marca en la linea
var status = payment.Add();
y si el error me dice que es algo del asiento contable, pero que se me hace raro es que si la factura ya tiene algo pagado, si registra bien el pago.
y tambien si intento hacer ese mismo pago en sap directamente me marca una advertencia pero si me deja continuar
me dice esto.
a cash account is required, chossing a diferent account may cause inaccurancies in the cash flow report

Similar Messages

  • Add Invoice with Payment Terms set 'Open Incoming Payment' = Cash - with DI

    Hi,
    I have this type of problem: I have defined a Payement Terms (Payment Terms - Setup) and I have set the field 'Open Incoming Payment' = Cash.
    In this way, when I create an Invoice and I put this 'Payment Terms' in Accounting Label, when I Add the Invoice, Sap open the 'Payment Means' form, and I must set the Total Cash of the payment. I set this field, click Ok, and then I'm able to Add the Invoice (and his Payment).
    If I try to do this operation with DI API, when I call .Add() method, I retrieve this error: "Invoice & receipt must be paid exactly  [OINV.GroupNum]". There is a method or property in SAPbobsCOM.BoObjectTypes.oInvoices that I must set to do automatically this operation?
    What can I do this???
    Thank you
    Marco

    Hi Niall,
    yes, I have set the property vInvoice.PaymentGroupCode = 2 , infact i retrive the error.
    If i try to set PaymentGroupCode = 1 or PaymentGroupCode = 3 (other 'normal' Payments Terms), my procedure work correctly, and the Invoice are added.
    If I try to set PaymentGroupCode = 2, i retrieve the error.
    This is my simple code:
                        vInvoice.Series = 26
                        vInvoice.CardCode = "C0001"
                        vInvoice.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO
                        vInvoice.DocDate = "10/01/2009"
                        vInvoice.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Service
                        vInvoice.PaymentGroupCode = 2
                        vInvoice.Lines.AccountCode = "11005010"
                        vInvoice.Lines.Quantity = 1
                        vInvoice.Lines.Currency = "Eur"
                        vInvoice.Lines.Price = 110
                        ret = vInvoice.Add()
                        If ret <> 0 Then
                            myDB.GetLastError(errCode, errMsg)
                            myapp.SetStatusBarMessage(errMsg, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
                        End If
    Thank
    Marco

  • Incoming  payments cash discount  A/R down payment request

    Hi
    I am trying to post an incoming  payments and to select a  A/R down payment request but I can not imput a cash discount?
    It is possible to post using a cash discount with the A/R down payment request.
    Thanks
    Claudio

    Hi Claudio,
    Welcome you post on the forum. A/R down payment request is not a financial document. There are more restrictions for it. You need A/R down payment invoice to get the option you need.
    Thanks,
    Gordon

  • F-28 Incoming Payment, Cash discount amnt and %

    Hi all,
    Does anyone know whether we can make the Cash Discount Amount and Discount percentage field column in F-28 screen to become uneditable (grey off) ?
    regards,
    sasuke

    Hi Roy,
    I tried before with SHD0, I entered F-28 but I got the error message saying variant are possible only for dialog transactions.
    regards,
    sasuke

  • Incoming payment - post discount & small differencas a total as one item

    Hi Guru,
    When posting incoming payment cash discount and small differences are posted as one item for each open item.
    For example:
    Open item    discount    Small difference
    100               1               0.05
    200               2               0.10
    At posting SAP post
    Item 1   300  (to clear the open item)
    Item 2   1  (cash discount)
    Item 3   2  (cash discount)
    Item 4   0.05 (small difference)
    Item 5   0.10 (small difference)
    Is there a way that I can group ALL discount and All small difference into one item each ie
    Item 1   300  (to clear the open item)
    Item 2   3       i.e. 1+2 the total of item 2 and 3 above  (cash discount)
    Item 3   0.15  i.e. 0.05+0.1 the total of item 4 and 5 above (small difference)
    If so,  where is the setting??
    Thanks
    Linda

    Hi,
    In general SAP clears on line item basis and posts line item for each clearing.  If my understanding is not wrong this is the standard behaviour.  This facilitates you to know each item that is cleared.  But please check the settings for clearing differences / charge off under business transactions/accounts receivable and accounts payable.  Unfortunately, I do not have a system handy to give you exact path.
    thanks,
    Kumar

  • Error while opening the Incoming Payment Form

    hi,
            When i open the incoming payment(Banking -> Incoming Payments -> Incoming Payment) in sap b1 07 i got a error message "linking primary sales account has not been  completed" .how can i open it?

    Open Administration -> Setup -> Financials -> G/L Account Determination ->Sales Tab ->General Tab.
    Check if the "Checks Received" and "Cash on Hand" accounts are set

  • Incoming payment posting error f-28

    Hi,
    here i trying to post incoming payment from customer  after discounted amount t-code f-28 , i am getting error message like this:
    Acct determination not defined for trans. SKT   in chart of accts S501
    Message no. F5113
    Diagnosis
    An automatic posting cannot be created because the account determination for transaction SKT with keys   is not defined in chart of accounts S501.
    System Response
    The document cannot be posted.
    Procedure
    Depending on the type of processing, you can hold the document and post it later. If this is not possible and the error cannot be eliminated straightaway in customizing, you must leave processing and enter the document later.
    Procedure for the system administrator
    Correct the account determination for the specified transaction. Proceed
    plase help
    Sre

    Hi,
    You have a cash discount being determined through payment term. But when you are processing the payment the system is not able to identify the GL account to post the cash discount amount.
    Go to SPRO>>Financial Accounting>>Accounts Receivable and Accounts Payable>>Business Transactions>>Incoming Payments>>Incoming Payments Global Settings>>Define Accounts for Cash Discount Granted
    Here you assign the GL account to post the cash discount amount.
    Hope this helps.
    thanks and regards,
    anit

  • Post incoming payment process open items error message

    Hello,
      When doing incoming payment process for open items one error message shows :"The difference is too large for clearing". It seems I have to input some amount in cash discount area.But actually the case discount amount is 0 in SO condition.
    Could you please help me on this issue?
    Thanks

    Hi ling zhang
    In F-28 you can clear the amount but you need to give the exact amount for that customer.
    The possible reason for getting that error while clearing is that customer must be having already some more open line items. 
    Just go to FBL5N and check the open line items and the total amount of that payer and then go to F-28 and then clear the amount
    Regards
    Srianth

  • Cash Discount taken incoming Payments

    Hi folks,
    when we allocation incoming payments to open AR, discounts might be taken from customers.
    We use FB05 for this.
    Discount GL is automatically chosen (OBXI) and correctly calculated.
    However, tax needs to be adjusted as well. This is not automatically done.
    What could be the reason for this?
    Tax Category field for "Cash discount expenses" is filled with "*".
    In case of purchase discounts in payment program F110, it works absolutely fine.
    please let me know if you need additional information
    Appreciate your help.

    Hi Benjamin,
    I tried your scenario in a test system and it work well (i.e. VAT line is generated), the only ways it does not work (and rightly so in my opinion) are:
    Cash discount account is set up as "no relevant for tax" (tax category is blank) in FS00
    The company code is set up with "tax base is net value" in OBY6 but in this case I get an error message at posting if my cash discount account is set up as "tax relevant" in FS00
    What is your setting for "cash discount" in OBY6 ?
    Regards
    Thomas

  • Cannot cancel Incoming Payment. One of the credit vouchers were cashed.

    Dear Experts,
    While canceling an incoming payment, I hit the below error message:
    "Cannot cancel. One of the credit vouchers were cashed."
    Please note that the deposits for this payment is cancelled.
    Please help advice!
    Warmest Regards,
    Chinho

    Hi!
    This problem is because of, the Due Date Mentioned in your payment is less than your System Date.
    To cancel this payment, do the following. (Do all this in SAP Server)
    1. As we need to change System Date ask all users to logg out from SAP.
    2. Ensure no user is booking any documents.
    3. Close SAP Appliaction and Change the system date previous or same date in the Due Date of that Document
    4. Select appropriate posting period, unlock posting period
    5. Open the Payment screen and select your document.
    6. Cancel the Document, choose document date as the cancel date.
    7. Close SAP again and change the system date to current date

  • Error when trying to cancel an incoming payment using a Credit Card

    I have searched and tried several things but I cannot seem to cancel an incoming payment when the credit card tab was used. I have tried to cancel before deposits, after the deposit (cancelling the deposit and then trying to cancel the inc. payment) but I still get the error. I have yet to see any post that will give a good process on how to fix this error.
    I did change the general settings for the credit voucher from automatic to manual in hopes that this will help future postings but I need the prior ones corrected that were made with the credit voucher option set to automatic. 

    Hi Joanne
    I was searching in fórums and I found:
    Cannot cancel Incoming Payment. One of the credit vouchers were cashed.
    Re: How to avoid "Unable to cancel payment. Credit voucher already cashed" err
    Cancel Incoming Payment (if Pay by credit card)
    Problem Reversing a Credit Card Payment
    Perhaps the easiest solution is changing the server date and making the operations to cancel the incoming payment.
    Kind regards
    Agustín Marcos Cividanes

  • Error adding Incoming Payments

    hello all
    I have a third party application, and I need to migrate incoming payments generated by that application. I read the headlines fit to be migrated to and through a loop trying to insert as many as required.
    A payment can pay multiple invoices to a client. And this payment can be made partly in cash, another in check and another in credit card.
    I had several error codes, but I will go for parts, first I get an error code (-10) and says it is an invalid document number in RCT2.DocEntry, reviewing SAP B1, if exist the invoice.
    For i = 0 To dvMigrar.Count - 1
       Console.WriteLine(CType(dvMigrar(i)("Ingreso_Caja"), String) + " " + dvMigrar(i)("Recibo_de_Caja"))
       vPay.Series = oSeries.Series
       vPay.ApplyVAT = BoYesNoEnum.tNO
       vPay.CardCode = Trim(dvMigrar(i)("Cliente_No"))
       vPay.CashSum = 0
       vPay.DocCurrency = "USD"
       vPay.DocDate = dvMigrar(i)("Fecha")
       vPay.DocRate = 0
       vPay.DocTypte = 0
       vPay.HandWritten = 0
       vPay.JournalRemarks = "Ingreso desde POS - " & CStr(dvMigrar(i)("Recibo_de_Caja"))
       vPay.LocalCurrency = BoYesNoEnum.tYES
       vPay.TaxDate = Now
       'Migración de Detalle Facturas Pagadas
       SlctCmd = "SELECT * FROM DOC_ABONAR_POS WHERE Ingreso_Caja = " & dvMigrar(i)("Ingreso_Caja")
       Dim SqlAdapter2 As OleDbDataAdapter = New OleDbDataAdapter(SlctCmd, MyConnSQL)
       dsMigrar2 = New System.Data.DataSet
       SqlAdapter2.Fill(dsMigrar2)
       Dim dvMigrar2 As DataView = New DataView(dsMigrar2.Tables(0))
       For j = 0 To dvMigrar2.Count - 1
          vPay.Invoices.Add()
          vPay.Invoices.DocEntry = dvMigrar2(j)("DocEntry")
          vPay.Invoices.InstallmentId = dvMigrar2(j)("No")
          vPay.Invoices.DocLine = j
          vPay.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice
          vPay.Invoices.SumApplied = dvMigrar2(j)("Valor")
          vPay.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice
       Next
       If (vPay.Add() <> 0) Then
          Console.WriteLine("No se pudo generar Pago")
          'Check Error
          Call vCompany.GetLastError(nErr, errMsg)
          If (0 <> nErr) Then
             Console.WriteLine("Error encontrado:" + Str(nErr) + "," + errMsg)
          End If
       End If
    Next
    I'm trying to pay several invoices at the same incoming payment
    Thanks in advance
    Edited by: Oscar Alberto Cornejo on Nov 14, 2011 11:20 AM

    hi trying for this sample code.
    Its working for me
         Dim blnNEWFirstRecord As Boolean = True                    
        For z As Integer = 0 To oSPRecSet.RecordCount - 1
                                oSalesPayments.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_Invoice
                                oSalesPayments.Invoices.DocEntry = oSPRecSet.Fields.Item("DocEntry").Value
                                oSalesPayments.Invoices.SumApplied = oSPRecSet.Fields.Item("OpenAmount").Value
                                If Not blnNEWFirstRecord = True Then
                                    oSalesPayments.Invoices.Add()
                                End If
                                blnNEWFirstRecord = False
                                oSPRecSet.MoveNext()
                            Next
    oPaymentError = oSalesPayments.Add()

  • Error in Incoming Payment

    Hi all,
    I'm getting an error while posting Incoming Payment.  The error is 'A current account has not been defined'.  I've selected house bank account at the header level i.e. GL Account, for that I'm getting warning message 'Defining credit/checking accounts as a cash account can affect the results of the cash flow report'.  Please advise on the above mentioned issue and suggest ways to avoid this and to post Incoming Payments successfully.
    Thanks,
    Balaji

    Dear Sir,
    Please make sure that you have selected a GL account for Checks Received in the Admin->Set up->Financials->GL Account Determination->Sales-General Tab.
    It should also appear in payment means window. When we coose or Change Bank GL account in payment means, we receive a system message that transaction will affect cash flow report. This is not an error message. You can continue to work.
    Regards
    Preety Goel
    SAP Business One Forums Team

  • F-28 error customer  incoming payment

    Hi Experts
    I am getting error when i ma trying to post customer incoming payments...
    Bank account is petty cash account
    Error : Balancing field profit center in line item 001 is not filled
    Kindly reply , thanks in advance
    Alex

    Hi,
    Please note that the error is expected when using Profit Center as a mandatory field ( in your splitting characteristics),
    but however no value can be derived when posting the incoming payment.
    If you want the field profit center to be a mandatory field, you need to make sure that this will be derived by your splitting rules.
    Please review the following two consulting notes in relation to the document splitting functionality:
    1085921 Document split
    891144  New GL/Document splitting: Risks w/ subsequent
    regards
    Waman

  • Error message: Banking - Incoming Payments - Incoming Payments

    Hi, Experts,
    When I was trying to post a deposit (for an A/R Invoice) to the bank account. I click  'Banking - Incoming Payments - Incoming Payments'. But there is a error message saying 'Linking primary sales accounts has not been completed'.
    How to fix this problems? Thanks!
    Lorrie

    Hi,
    Check Note No. 871509 if the same applies to your case.
    Request you to kindly check the following :
    1. First define revenue account under administration->setup- >financial   ->G/L account determination -> sales tab and check whether the issue was solved or not.
    2. if the error still exists after step 1, you have to define all the
       other accounts that you have not defined previously. Then your
       issue might be resolved.
    Even if there are no bookings to go on a primary sales or purchase account, an account must be defined for SBO to work. Ideally, ALL sales, purchase and tax accounts should be defined. Once the account code is entered, the error message disappears and SBO works normally.
    Other possibility is that one of your primary accounts is defined
    as "confidential". (sales/purchase/Cash etc..)
    Hope it helps.
    Regards,
    Jitin

Maybe you are looking for

  • Sales Order - Export help needed

    Hi Gurus I am checking Export Sales Order Settings and also testing export sales order. While creating sales order I am getting one error "Material SDHD00000A4A0501 is not defined for sales org.1200, distr.chan.00,  language EN" Kindly give me the de

  • Colour Profile issues between North America and Europe

    I have a corporate colour, C80M80Y0K0 which creates a very attractive shade of purple. Within North America all printouts demonstrate very similar variations of that purple colour. We have an office in UK that uses the same collateral pieces. While t

  • Blackberry8330smartphone hardware

    hello out there, i'm having a problem loading software hoping someone can help.  working with vista after i loaded everything i restarted puter and came up with runtime error had to get back on in safe mode and restore .  seems to be roxi that's givi

  • CS4 on Mountain Lion

    Can I transfer Photoshop CS4 to Mac 10.8, Mountain Lion? If so, what do I have to do to make it work?

  • Suitable documentation about the SMPP- Job sceduling, integration in SOLMAN

    Hi! I look for the documentation regarding the SMPP-Job sceduling and integration this scenario into SOLMAN. Other question: is there some blogs or docu pool on SDN forum with documentation for SOLMAN? What is the URL for this? Thank you very much! r