How to create A/R Down payment Invoice

Hi;
I am trying to create A/R Down Payment Invoice through DI API by using the below mentioned object but the system is giving me the following error "Invalid Value. {DPI1.ExLineNo} {Line No. 1}".
  SAPbobsCOM.Documents oDoc SAPbobsCOM.Documents)x.CompanyObject.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDownPayments);
            oDoc.Lines.SetCurrentLine(0);
            oDoc.CardCode = "C0001";
            oDoc.Lines.ItemCode = "Test";
            oDoc.Lines.Quantity = 2;
            oDoc.Lines.UnitPrice = 10;
            oDoc.Lines.ActualDeliveryDate = DateTime.Now.Date;
            oDoc.Lines.BaseType = 17;
            oDoc.Lines.BaseLine = 1;
            oDoc.Lines.BaseEntry = 1;
            oDoc.Lines.ExLineNo
            int oRetVal = oDoc.Add();
            if (oRetVal != 0)
                MessageBox.Show(x.CompanyObject.GetLastErrorDescription());
Please suggest me how I can create AR Down Payment Invoice along with Incoming Payment and then wanted to link AR down payment invoice with AR invoice.
Regards;
Deepak

Hi
Try this code
Try
'Create DownPayment Invoice Object
        oDPM = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDownPayments)
        'Set Down Payment Header Values
        oDPM.CardCode = "Some Card code"
        oDPM.DocDueDate = "Suitable Date"
        oDPM.DownPaymentPercentage =" Numeric value (Double)"
        oDPM.DownPaymentType = SAPbobsCOM.DownPaymentTypeEnum.dptInvoice
        'Set Down Payment Line Values
        oDPM.Lines.ItemCode =" Some Item Code"
        oDPM.Lines.Quantity =" Quantity"
        oDPM.Lines.Price =" Item Price"
        lRetCode = oDPM.Add ' Try to add the invoice to the database
        If lRetCode <> 0 Then
             oCompany.GetLastError(lErrCode, sErrMsg)
             MsgBox(lErrCode & " " & sErrMsg) ' Display error message
        Else
             MsgBox("Down Paymeny Invoice Added to DataBase", MsgBoxStyle.Information, "Invoice Added")
        End If
    Catch ex As Exception
        MsgBox(ex.Message)
    End Try
Regards
Arun

Similar Messages

  • How to cancel an AR Down Payment Invoice

    Hello,
    I could not find any documentation on this, but it may happen that an AR Down Payment Invoice has been created twice on the same Sales Order.
    What should you do to ensure you disable/correct/cancel/delete an AR Down Payment Invoice from SBO?
    Regards,
    Petronella
    Edited by: Marc Riar on Feb 14, 2008 9:39 AM

    Hello Suda,
    Unfortunately I am not known with the SBO_SP_TRansactionNotification Stored Procedure.
    I have done the procedure below, but no result (no block/error message) like described..
    I did the following within SQL Server 2005. Selected folder 'Databases' and then the database for which the block is needed.
    Selected folder 'Programmability'
    Selected folder 'Stored Procedures'
    Selected
    Right mouse click on dbo.SBO_SP_TransactionNotificiation
    Selected option: Script Stored Procedure As>Alter To>New Query Editor Window
    Then copied the query mentioned in the other tread in below:
    --     ADD     YOUR     CODE     HERE
    Like below:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER proc [dbo].[SBO_SP_TransactionNotification]
    @object_type nvarchar(20),                     -- SBO Object Type
    @transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int                    -- Result (0 for no error)
    declare @error_message nvarchar (200)           -- Error string to be displayed
    select @error = 0
    select @error_message = N'Ok'
    IF @transaction_type = 'A' AND @Object_type = '203'
    BEGIN
    IF EXISTS (SELECT T2.DOCNUM, T2.DOCTOTAL, SUM(T1.DOCTOTAL) FROM
    dbo.DPI1 T0 INNER JOIN dbo.ODPI T1 ON T1.DocEntry = T0.DocEntry
    INNER JOIN dbo.ORDR T2 ON T2.DOCENTRY = T0.BASEENTRY
    WHERE T0.BaseEntry = @list_of_cols_val_tab_del
    GROUP BY T2.DOCNUM, T2.DOCTOTAL
    HAVING T2.DOCTOTAL < SUM(T1.DOCTOTAL))
    BEGIN
    SELECT @Error = 1, @error_message = 'DOWN PAYMENT AMOUNT GREATER THAN ORDER TOTAL'
    END
    END
    -- Select the return values
    select @error, @error_message
    end
    GO
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO

  • How to close an AR Down Payment Invoice

    SCENARIO:
    The customer added in SAP B1 an sales order, then registered an AR Down Payment Invoice for the all amount.
    After that he registered the incoming payment and at the end he registered a AR invoice linked to the previous AR Down Payment.
    The amount of the AR invoice is less than AR Down Payment one.
    The customer asks if is possible to close the AR Down Payment for the open amount creating a "payment on account" of the same amount.
    Creating an "payment on account" give the customer the possibility to show the amount on the Account Balance Details.
    Thank You in advance.
    Emanuele

    1. AR down payment invoice is closed when you raising incoming payment. So this AR down payment invoice will not appear in incoming payment selection list
    >>> Yes
    2. Further due to partial payment, only AR invoice will be in open status and this AR invoice will appear in incoming payment selection
    >>>the problem is that the AR invoice is registered with a less amount than the amount of the incoming payment
    3. If you want use Payment on account for balance amount, are you able to choose customer account at GL account field?
    >>>the AR invoice is just closed with incoming payment
    4. I don't think it is possible to post balance amount via payment on account. To get correct BP account balance, we have to post at customer account.
    >>>Yes. But if you open the report Sales --> Sales Report --> Open Report --> Incoming payment you continue to see the open amount of the Incoming payment.
    After all my idea is to register a not real AR invoice (really not exist) to link to the open amount of the Incoming payment:
    01: In the report Sales --> Sales Report --> Open Report --> Incoming payment I will not have more open amount
    02: After that I will adjust BP account balance with a post at customer account
    Thank you for your opinion ....

  • How to automatically 'draw' a down payment invoice into an invoice?

    My customer would like to have their down payments draw into their invoices automatically, without having to click the '...' and display the down payments list to select.  They only ever have one down payment for an invoice.  Can this be done through formatted search or only through SDK?

    Hi Pat,
    You need to test out the exact scenario what you described initially in the thread on PL35 demo. Do the same steps in the PL44.
    Check the following steps :
    1) Create a Sales Order. Add
    2) Goto the Payment Means from the Sales Order and enter the amountpaid.
    3) The Downpayment is created.
    4) Goto the AR Invoice and create Invoice based on the Sales Order (Copyfrom).
    5) You will see that the Downpayment amount field is not filled in the AR Invoice.
    However, when try to reproduce the same steps in the 2007A PL35, the Downpayment amount is displayed in the AR Invoice downpayment field automatically.
    Regards,
    Jitin
    SAP Business One Forum Team

  • Amout check on Down payment Invoice

    Dear All,
    while creating a down payment invoice, the system have not any check on the amount of the base document. as if we have a purchase order of amount 100$ and we create a down payment invoice initially of 30% and pay it through out going payments, and again we create a down payment invoice and assign 100% the system allow us to create it against the same vender without show the remaining balance or any amount exceeding notification.
    so in actual the amount would be 130$ and when we try to create the A/P Invoice with reference to that PO. system will not allow us to create invoice as the total will be higher then the actual PO.
    Kindly guide me in this regard. how can we control the down payments amount with reference to due amount.
    Regards,
    Awais

    Hi,
    it is a system default which will allow you to create as many down payment invoice as possible.
    it is just based on the BP code.You can create a standalone down payment invoice for any BP,item or service type and then you can link this to your Invoice.
    During the invoice you will be selecting your down payments in the invoice window.Here you will be seeing only the down payments which you have made already the payments.
    And if you try to select the down payments whose total is greater than invoice system will block you.
    If you want to link down payment based on PO then i think through coding it is possible
    Regards
    Md.nazeer Shaikh

  • AR Down Payment Invoice - Freight field needed

    Hi,
    I have various freight options defined in Admin>Setup>General>Freight.
    When I create an AR Invoice there is a Freight field in the General area near the Total field, here I can click the orange arrow and select the appropriate freight option from the list.
    But when I create an AR Down Payment Invoice this Freight field is not appearing.
    Can anyone advise how to have the Freight field appear so I can add freight to an AR Down Payment Invoice in the same way as an AR Invoice? I have tried the form settings but have not resolved the problem

    Thank you Jitin
    This is the scenario - perhaps there is a better way for me to manage the process than Down Payment Invoice? :
    Our normal process with an established customer who has a 30-day credit account:
    We create SAP Sales Order.
    When goods are ready to ship we copy Sales Order to Delivery which adjusts the stock level and we ship the goods.
    We then copy Delivery to AR Invoice and add the freight.
    But when a new customer wishes to place an order we require payment in full including tax & freight before shipping:
    So I need to create a document to send the customer which is the same as the final invoice including tax & freight but which does not make any adjustment to the stock.
    What is the best way to do this?

  • Issue Reg Down Payment Invoice/Request

    Dear All,
    I have  a scenario where in i have created Purchase Order with CENVAT Components (i.e. BED @8, Cess@2, and Hess@1 along with VAT @4) the total value including tax is say about Rs140000.00. Now i want to pay full Amount as  advance i.e 140000.00 (say 120000.00 basic value and 20000.00 tax value ).
    When i am trying to create A/P Down Payment Invoice against that Purchase Order as a Full Advance (100%) system is showing error for CENVAT Components, as we can not consider this in A/P Down Payment Invoice.
    Can any body tell me any work around ? or alternative way of doing it ?
    Regrds,
    Kashinath

    HEY I HAVE SOLVED THIS ISSUE MYSELF

  • Down Payment Invoice and A/R Invoice

    Dear Expert
    I have been experiencing a scenario where my client wants to create A/R down payment Invoice to their Customers. But the down payment may or may not be received before issue of the (balanced) A/R invoice and further the client sometimes would have to issue the down payment invoice together with the (balanced) A/R invoice to customers.
    The problem is that SAP B1 does not allow me to refer or adjust the down payment in A/R invoice unless there is Incoming Payment received against the down payment . But as per this scenario the payment may or may not be received before raising the (balanced) A/R invoice.
    I know that using the A/R down payment request could solve the billing issue, however, it can not reflect account receivable of customers which can not satisfy my client's need.
    Could you please suggest some workarounds to overcome this limitation?
    Thank you very much
    Regards
    Elton

    Dear Expert
    Let me clarify my client's scenario more to see whether you could give advise.
    My client's business is project based and the invoicing flow is as below:
    Phase 1 -
    Invoicing  30%
    Phase 2 -
    Invoicing  30%
    Phase 3 -
    Invoicing  40%
                                                   Total 100%
    However, invoice for phase 2 maybe issued before invoice for phase 1 is paid and so do invoice for phase 3.
    There is also possibility that invoice for phase 1 is paid while invoice for phase 2 is not at the time when whole project is completed. Invoice for phase 3 therefore has to be issued before invoice for phase 2 is paid.
    The installments for A/R is not applicable in this case since sales would be realized at the time when the A/R invoice is issued.
    My client would have to realize the sales upon completion of project phase. A/R down payment invoice almost satisfy this scenario however, no A/R invoice of the balance with reference to the down payment invoices can be issued before the down payment invoices are settled.
    Can anything be done to overcome this limitation?
    Regards
    Elton

  • Down Payment invoice to be reversed or cancelled

    While entering the opening balances we have posted a  Down payment invoice twice by mistake. The Journal entries as a result of this are as under:
    1. While the down payment invoice was posted the first time (correct transaction):
                                                             (Value in Local Currency)
    (a) Party A      Dr.                            10,000/-
         To Prepayments rec 3rd                          10,000/-
       (Invoice No.001)
    (b)While booking the payment for the above invoice no.001:
    Bank     Dr.                                       10,000/-
         To Party A                                                              10,000/-
       (Receipt for Invoice No.001)
    2. While the down payment invoice was posted the second time (duplication done by mistake):
                                                             (Value in Local Currency)
    (a) Party A      Dr.                            10,000/-
         To Prepayments received                          10,000/-
       (Invoice No.002)
    (b)To rectify the above invoice no.002 the below Journal was passed:
    Prepayments received    Dr.                     10,000/-
         To Party  A                                                             10,000/-
       (Reversal of Invoice No.002)
    The opening balances were then tallied and we started posting the regular transactions
    However when we made a A/R Invoice for the above party we wanted to call the down payment invoices we got both both down payment invoices 001 and 002. We want to adjust only down payment invoice 001 and want to cancel down payment invoice 002.
    Please advise how to cancel or reverse down payment invoice 002.
    Thanks in advance
    Venkatesan Swaminathan

    Hi Venkatesan,
    please see this thread:
    Cancel down payment
    All the best,
    Kerstin

  • Final invoice without paying existing down payment invoice

    One of our customers demands some changes within the Business One.
    The support in Ireland advised us to post these requirements in this Forum.
    The customer has created an AR down payment invoice. This invoice was not paid, but the delivery took place anyway. Now it's not possible to create the final AR invoice, without paying the down payment invoice first.
    In my opinion that's logical but our customer demands this possibility anyway.

    Hi,
    No other feasible workaround other than creating AP Down Payment Invoice to record the TDS.
    Kind Regards,
    Jitin
    SAP Business One Global Support

  • A/P Down Payment Invoice error....

    Hi all....
    Please Help me...
    I done all setup relevant to Vendor/Supplier for Business Partner Data...........
    But whan I am creating A/PDown payment Invoice I got error...
    In Vendor AP Down Payment Invoice I got error i.e "No Matching Records Found"
    so what is the solutions.....
    I am not getting error for my customer... when I am creating A/R Down Payment Invoice...
    Please help me...
    Regards
    Umang

    Hi... Nagesh ......
    Dear Please... see here  What I done....
    First I done...
    Admin--> set up --> Finance -> G/L Acct .. determination
    Set control Account for Sales & Purchase.
    2)
    Then I assigned Control Account in Accounting Tab of Business Partner Records...
    3) I created AP Down Payment Invoice for Vendor Based on Goods Receipt PO ....... After adding that ... Then I go for AP Invoice .....
    Whn I click on DPM Tab It gives me error....."No Matching Records Found"
    Ok .... If you have solution plz tell me....
    Please ! do in your system .... and chk where I do mistake ?
    Note :  For Customer I am not getting error
    Regards
    Umang

  • How to block a delivery when an A/R Down Payment Invoice is not paid?

    1. Create and add a Sales Order
    2. Create and add an A/R Down Payment Invoice based on the created Sales Order (set DPM % to 50)
    3. Create and add a Delivery based on the created Sales Order
    The delivery is not blocked.
    Is there an easy workaround/alternative to ensure goods are stopped from being delivered when a customer hasn't paid a certain amount upfront?

    Hi Suda,
    Unfortunately my usage of the sql queries is a bit rusty and am not sure if I am doing this correctly.
    Next to that I don't exactly see how it should work (hence my comment being rusty - haven't used this very often). I see that it checks the AR Down Payment Invoice document and lines, but how it checks to which sales order it is connected to stop the delivery.. Plus I always want it to stop any delivery when an AR Down Payment for any percentage hasn't paid in full untill it has been paid/approved by someone to be delivered. If no AR Down Payment has been done, there is no issue.
    Anyway I have copied your query to the Query Generator and saved it.
    I created an approval procedure based on delivery documents and based it on the saved query.
    Added a sales order and created a Down Payment Invoice based on the sales order with 40% that has to be paid upfront. Created a delivery based on the sales order and added the document. I only gotten an internal error (it went so quickly I can't see the actual whole message because I get the created message straight after), but it created the delivery anyway.. (same as you described maybe?)
    I'm missing something obviously, let me know what to do.
    Regards,
    Petronella

  • How can we reject a Sales order after first Down payment invoice for Italy?

    Hello,
    As a legal requirement in Italy the Down paymenty have to be transformed into real invoices, another legal requirement is that an invoice cannot be cancelled it has to reversed by a credit memo.
    I would like to know in this context how we can reject a sales order line once a Down payment invoice has been emitted.
    When I do enter a reason for rejection in the sales order line I receive the message : V1036: Subsequent documenst exist for item XXX and then V2432 Cancellation not possible. Down payment request already created.
    I can create a down payment credit memo in order to cancel the down payment invoice but how can I get rid of my SD requirement in MD04 if I cannot reject the sales order line?

    Hello,
    have you tried using a recjection code which is not relevant for billing?
    Regards,
    Uli

  • How to link ap down payment invoice to ap invoice which have added.

    Hi,Expert,
      I encounter this situation in detail as follow:
    1. raisethe PO add row line with respective itemcode and quatity.
    2. raisethe ap down payment invoice  copy from the po created  just now.
    3. raise the bank -> outgoing pay the cash base on this down pay invoice.
    3. raise the Ap invoice copy from PO ,however,the user do'nt link related down pay invoice.
    This result in the account is confused and wrongly pay double amount for supplier.
    How can I process to repair it  now  and avoid it in the future ?
    Thank you in advance ,appreciate any comment and help.
    Best Regards
    Eric

    Hi Eric,
    The general down payment process is as below:-
    (1) The down payment request is made in F-47
    (2) The down payment is made in F-48
    (3) Then you create the MIRO invoice
              During MIRO, the system gives up a pop-up to show whether the down payment exist for the vendor or not. This is an information message and user will continue to process MIRO.
    (4) After processing MIRO, user need to immediatly clear the down payment againest the MIRO invoice via F-54. In F-54, on selection screen invoice number is given and then from "Process open item" you can get the list of the doan payments for the vendor to choose from.
    Regards,
    Gaurav

  • Error in creating document series at A/R Down payment Invoice

    Dear All,
    One of my client has 4 Regional Offices,one in Delhi,one in Mumbai,one in Chennai and one in Gurgaon.
    For all the other RO's I have created seperate document number series for A/R Down payment Invoice but when I am trying to create a new series for Gurgaon RO, I am receiving an error message as"Another User is Modified(NMC1) ".
    Please put your valuable thought on this issue and help me to resolve this issue.
    Thanks & Regards,
    Ashish

    Close the Document Numbering Screen and Open again and Update the Series.
    Ensure that the Series Nos don't overlap

Maybe you are looking for