Cannot create more than one sales invoice

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot create more than one sales invoice

Xavier Olivella
Hi everybody,
 
I started using opentaps a couple of months ago, mainly as a CRM for
quotes and everything was fine.
Now I need to start doing some sales, and I have a problem generating
invoices. I set up financials and accounting settings.
The problem is that I can convert one order to an invoice (I do it with
the "Quick ship entire order" button), but the following orders fail as
OT is trying to assign them the same invoice number (2007-1 in this
case).
I've read all the accounting and financials docs, but cannot find
anything that can cause this problem.
 
Thanks in advance, the error generated is the following:
 
The Following Errors Occurred:
 
ERROR: Could not complete the Sub-method used by quickShip methods to
create a shipment
[file:/usr/local/test01/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml#createShipmentForFacilityAndShipGroup] process [problem invoking the [updateShipment] service with the map named [packedContext] containing [[shipmentId=10012, statusId=SHIPMENT_PACKED, userLogin=[GenericEntity:UserLogin][createdStamp,2007-05-31 13:21:26.0(java.sql.Timestamp)][createdTxStamp,2007-05-31 13:21:26.0(java.sql.Timestamp)][currentPassword,a059d9ac5e0b9c8067ae0cebb9a5bcba1636c386(java.lang.String)][disabledDateTime,null()][enabled,Y(java.lang.String)][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,ca(java.lang.String)][lastUpdatedStamp,2007-07-04 18:25:10.0(java.sql.Timestamp)][lastUpdatedTxStamp,2007-07-04 18:25:10.0(java.sql.Timestamp)][partyId,X.Olivella(java.lang.String)][passwordHint,null()][successiveFailedLogins,0(java.lang.Long)][userLoginId,x.olivella(java.lang.String)], locale=ca]]: Problems with the transaction. (Exception while inserting the following entity: [GenericEntity:Invoice][billingAccountId,null()][createdStamp,2007-07-04 19:59:06.653(java.sql.Timestamp)][createdTxStamp,2007-07-04 19:59:04.314(java.sql.Timestamp)][currencyUomId,EUR(java.lang.String)][dueDate,null()][invoiceDate,2007-07-04 19:59:06.511(java.sql.Timestamp)][invoiceId,2007-1(java.lang.String)][invoiceTypeId,SALES_INVOICE(java.lang.String)][lastUpdatedStamp,2007-07-04 19:59:06.653(java.sql.Timestamp)][lastUpdatedTxStamp,2007-07-04 19:59:04.314(java.sql.Timestamp)][partyId,10001(java.lang.String)][partyIdFrom,Company(java.lang.String)][statusId,INVOICE_IN_PROCESS(java.lang.String)] (while inserting: [GenericEntity:Invoice][billingAccountId,null()][createdStamp,2007-07-04 19:59:06.653(java.sql.Timestamp)][createdTxStamp,2007-07-04 19:59:04.314(java.sql.Timestamp)][currencyUomId,EUR(java.lang.String)][dueDate,null()][invoiceDate,2007-07-04 19:59:06.511(java.sql.Timestamp)][invoiceId,2007-1(java.lang.String)][invoiceTypeId,SALES_INVOICE(java.lang.String)][lastUpdatedStamp,2007-07-04 19:59:06.653(java.sql.Timestamp)][lastUpdatedTxStamp,2007-07-04 19:59:04.314(java.sql.Timestamp)][partyId,10001(java.lang.String)][partyIdFrom,Company(java.lang.String)][statusId,INVOICE_IN_PROCESS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO INVOICE (INVOICE_ID, INVOICE_TYPE_ID, PARTY_ID_FROM, PARTY_ID, ROLE_TYPE_ID, STATUS_ID, BILLING_ACCOUNT_ID, CONTACT_MECH_ID, INVOICE_DATE, DUE_DATE, PAID_DATE, INVOICE_MESSAGE, REFERENCE_NUMBER, DESCRIPTION, CURRENCY_UOM_ID, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate key or integrity constraint violation message from server: "Duplicate entry '2007-1' for key 1"))))]



Reply | Threaded
Open this post in threaded view
|

Re: [UpDate] Cannot create more than one sales invoice

Xavier Olivella
Testing a little bit more I found that setting up invoice sequence to
"Enforced Sequence (no gaps, per organization)" everything is fine.
I keep investigating this problem and seems it comes from Accounting
Time period definitions.
 
I set up my time periods (importing XML from webtools), but they are not
working since I cannot see them in financials or accounting
application.
 
When I set up a period as "current period" (in custom time period in
webtools) this setting is not saved.
And I try to set up a hierarchy but no one of them keeps his "parent
period", they are all orphans, including fiscal year (I wonder which
parent it must have).
 
Does anybody know if there is some docs about this?

Thanks!


El dj 05 de 07 del 2007 a les 12:44 +0200, en/na Xavier Olivella va
escriure:

> Hi everybody,
>  
> I started using opentaps a couple of months ago, mainly as a CRM for
> quotes and everything was fine.
> Now I need to start doing some sales, and I have a problem generating
> invoices. I set up financials and accounting settings.
> The problem is that I can convert one order to an invoice (I do it with
> the "Quick ship entire order" button), but the following orders fail as
> OT is trying to assign them the same invoice number (2007-1 in this
> case).
> I've read all the accounting and financials docs, but cannot find
> anything that can cause this problem.
>  
> Thanks in advance, the error generated is the following:
>  
> The Following Errors Occurred:
>  
> ERROR: Could not complete the Sub-method used by quickShip methods to
> create a shipment
> [file:/usr/local/test01/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml#createShipmentForFacilityAndShipGroup] process [problem invoking the [updateShipment] service with the map named [packedContext] containing [[shipmentId=10012, statusId=SHIPMENT_PACKED, userLogin=[GenericEntity:UserLogin][createdStamp,2007-05-31 13:21:26.0(java.sql.Timestamp)][createdTxStamp,2007-05-31 13:21:26.0(java.sql.Timestamp)][currentPassword,a059d9ac5e0b9c8067ae0cebb9a5bcba1636c386(java.lang.String)][disabledDateTime,null()][enabled,Y(java.lang.String)][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,ca(java.lang.String)][lastUpdatedStamp,2007-07-04 18:25:10.0(java.sql.Timestamp)][lastUpdatedTxStamp,2007-07-04 18:25:10.0(java.sql.Timestamp)][partyId,X.Olivella(java.lang.String)][passwordHint,null()][successiveFailedLogins,0(java.lang.Long)][userLoginId,x.olivella(java.lang.String)], locale=ca]]: Problems with the transaction. (Exception while inserting the following entity: [GenericEntity:Invoice][billingAccountId,null()][createdStamp,2007-07-04 19:59:06.653(java.sql.Timestamp)][createdTxStamp,2007-07-04 19:59:04.314(java.sql.Timestamp)][currencyUomId,EUR(java.lang.String)][dueDate,null()][invoiceDate,2007-07-04 19:59:06.511(java.sql.Timestamp)][invoiceId,2007-1(java.lang.String)][invoiceTypeId,SALES_INVOICE(java.lang.String)][lastUpdatedStamp,2007-07-04 19:59:06.653(java.sql.Timestamp)][lastUpdatedTxStamp,2007-07-04 19:59:04.314(java.sql.Timestamp)][partyId,10001(java.lang.String)][partyIdFrom,Company(java.lang.String)][statusId,INVOICE_IN_PROCESS(java.lang.String)] (while inserting: [GenericEntity:Invoice][billingAccountId,null()][createdStamp,2007-07-04 19:59:06.653(java.sql.Timestamp)][createdTxStamp,2007-07-04 19:59:04.314(java.sql.Timestamp)][currencyUomId,EUR(java.lang.String)][dueDate,null()][invoiceDate,2007-07-04 19:59:06.511(java.sql.Timestamp)][invoiceId,2007-1(java.lang.String)][invoiceTypeId,SALES_INVOICE(java.lang.String)][lastUpdatedStamp,2007-07-04 19:59:06.653(java.sql.Timestamp)][lastUpdatedTxStamp,2007-07-04 19:59:04.314(java.sql.Timestamp)][partyId,10001(java.lang.String)][partyIdFrom,Company(java.lang.String)][statusId,INVOICE_IN_PROCESS(java.lang.String)] (SQL Exception while executing the following:INSERT INTO INVOICE (INVOICE_ID, INVOICE_TYPE_ID, PARTY_ID_FROM, PARTY_ID, ROLE_TYPE_ID, STATUS_ID, BILLING_ACCOUNT_ID, CONTACT_MECH_ID, INVOICE_DATE, DUE_DATE, PAID_DATE, INVOICE_MESSAGE, REFERENCE_NUMBER, DESCRIPTION, CURRENCY_UOM_ID, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate key or integrity constraint violation message from server: "Duplicate entry '2007-1' for key 1"))))]
>
>
>