on 10-17-2011 8:46 AM
Hi all,
previous we adding invoice and A?R Invoice using object.
Please help How to Add A/R Downpayment Invoice using object ?
thanks in advance
surajit
Edited by: Surojit Kundu on Oct 17, 2011 11:37 AM
Hi
Try this
'Create DownPayment Invoice Object
oDPM = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDownPayments)
'Set Down Payment Header Values
oDPM.CardCode = txtCardCode.Text
oDPM.DocDueDate = DateDue.Value
oDPM.DownPaymentPercentage = Convert.ToDouble(numPercent.Value)
oDPM.DownPaymentType = SAPbobsCOM.DownPaymentTypeEnum.dptInvoice
'Set Down Payment Line Values
oDPM.Lines.ItemCode = txtItemCode.Text
oDPM.Lines.Quantity = Convert.ToDouble(txtQuantity.Text)
oDPM.Lines.Price = Convert.ToDouble(txtPrice.Text)
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 Payment Invoice Added to DataBase", MsgBoxStyle.Information, "Invoice Added")
' Enabling the next button in the process
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.