Reputation: 267
I have code to Create a Vendor Payment
for aVendor Bill
like this :
InitializeRecord ir = new InitializeRecord();
ir.type = InitializeType.vendorPayment;
InitializeRef iref = new InitializeRef();
iref.typeSpecified = true;
iref.type = InitializeRefType.vendorBill;
iref.internalId = vendorBillId;
ir.reference = iref;
Login();
ReadResponse getInitResp = _service.initialize(ir);
if (getInitResp.status.isSuccess)
{
Record rec = getInitResp.record;
((VendorPayment)rec).total = (double)amount; //I don't want to pall all, just pay a half or just an amount less than the total
((VendorPayment)rec).totalSpecified = true;
WriteResponse writeRes = _service.add(rec);
return writeRes.status;
}
That can create a payment but the total is not apply, the payment is pay all amount of vendor bill's total.
I don't know what I'm missing here.
Upvotes: 0
Views: 392
Reputation: 7343
While applying payments to bill you cannot change the body level amount field. you got to change the amount
line level field on apply
line item record. I am not sure on syntax in Suitetalk, but, that should work.
Upvotes: 1