Hello,
1. I created a billing account on supplier side with amount 0$
2. I did a payment from our bank to suppliers billing account f.ex. 10000$
This amount is like a deposit, were we pay our upcoming invoices from
3. I created a purchase invoice (without an order), referenced to the
billing account of the supplier
4. I get to accounting >> billing accounts >> invoices of the selected
account
after that I pressed capture to pay the invoice with our credit balance on
the billing account
error:
*The Following Errors Occurred:
Attempt to settle Invoice xxxx which contained none/multiple orders*
So I checked the source code (PaymentGatewayServices.java:
/// make sure they are all for the same order
String testOrderId = null;
boolean allSameOrder = true;
if (orderItemBillings != null) {
Iterator<GenericValue> oii = orderItemBillings.iterator();
while (oii.hasNext()) {
GenericValue oib = oii.next();
String orderId = oib.getString("orderId");
if (testOrderId == null) {
testOrderId = orderId;
} else {
if (!orderId.equals(testOrderId)) {
allSameOrder = false;
break;
}
}
}
}
if (testOrderId == null || !allSameOrder) {
Debug.logWarning("Attempt to settle Invoice #" + invoiceId + "
which contained none/multiple orders", module);
return
ServiceUtil.returnFailure(UtilProperties.getMessage(resource,
"AccountingInvoiceCannotBeSettle",
UtilMisc.toMap("invoiceId", invoiceId), locale));
}/
So it seems to have an order ID for each purchased item. Is that correct?
The thing is, I want to integrate purchase invoices from the last year out
of other systems, to be balanced at now...so I have not inserted the items
into my system. So I choosed as Invoice Item Type: Invoice Product Item with
my own description, cause its not in the system.
How can I handle that case? Ineed to bring invoices into the system without
doing an order before.
Btw. im wondering why I cannot upload an invoice file to each invoice that I
created in the system. Cause we create a purchase invoice to now what we
have to get and what we have to pay. But after that we get the goods and we
get a paper invoice from supplier which we have to archieve in our system.
How do you handle it?
thanks in advance and greetings to you all,
Robert
--
View this message in context:
http://ofbiz.135035.n4.nabble.com/capture-invoice-on-billing-account-error-tp4541241p4541241.html
Sent from the OFBiz - User mailing list archive at Nabble.com.