Login  Register

Re: Error when adding a payment ...

Posted by Ian Gilbert-2 on Jul 12, 2006; 8:14am
URL: http://ofbiz.116.s1.nabble.com/Error-when-adding-a-payment-tp140669p140671.html

Thanks for responding David,

I figured shortly afterwards that this was the problem.  I manually put this in rather than using
thelookup form which I think works fine.


On Tue, July 11, 2006 16:33, David E. Jones wrote:
>

> The last bit of the message is the key: it is violating a the from party foreign key. It looks
> like you have entered "COMPANY" which is not valid unless you have created one. The demo data
> value for that is "Company".
>
> Which form did you use for this? Did it have a lookup window?
>
>
> -David
>
>
>
> Ian Gilbert wrote:
>
>> Hi All,
>>
>>
>> I am testing a fairly recent build with a payment process and have tried to raise a payment in
>> compensation for a purchase order which was raised successfuly.
>>
>> I am getting the error attached with this and am not sure why.  Can anyone shed any light on
>> this? It is clearly a foreign key violation but I'm not sure why?  The dataset used is the
>> default demo data.  I have posted the full error (which is truncated in the image at the bottom
>> of this mail.
>>
>> Very best wishes
>>
>>
>> Ian
>>
>>
>> *  ERROR: Could not complete the Create a Payment
>> [file:/home/ofbiz1/apps/ofbiz_ethical/applications/accounting/script/org/ofbiz/accounting/paymen
>> t/PaymentServices.xml#createPayment] process [problem creating the payment value: Exception
>> while inserting the following entity:
>> [GenericEntity:Payment][amount,73.48(java.lang.Double)][comments,null()][createdStamp,2006-07-1
>> 1
>> 16:27:20.629(java.sql.Timestamp)][createdTxStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][effectiveDate,2006-07-11
>> 16:25:38.36(java.sql.Timestamp)][finAccountTransId,null()][lastUpdatedStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][lastUpdatedTxStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][overrideGlAccountId,null()][partyIdFrom,COMPANY(java.lang.Stri
>> ng)][partyIdTo,DemoSupplier(java.lang.String)][paymentId,10010(java.lang.String)][paymentMethod
>> Id,null()][paymentMethodTypeId,PERSONAL_CHECK(java.lang.String)][paymentPreferenceId,null()][pa
>> ymentRefNum,null()][paymentTypeId,VENDOR_PAYMENT(java.lang.String)][roleTypeIdTo,null()][status
>> Id,PMNT_NOT_PAID(java.lang.String)]
>> (while inserting:
>> [GenericEntity:Payment][amount,73.48(java.lang.Double)][comments,null()][createdStamp,2006-07-11
>>  16:27:20.629(java.sql.Timestamp)][createdTxStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][effectiveDate,2006-07-11
>> 16:25:38.36(java.sql.Timestamp)][finAccountTransId,null()][lastUpdatedStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][lastUpdatedTxStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][overrideGlAccountId,null()][partyIdFrom,COMPANY(java.lang.Stri
>> ng)][partyIdTo,DemoSupplier(java.lang.String)][paymentId,10010(java.lang.String)][paymentMethod
>> Id,null()][paymentMethodTypeId,PERSONAL_CHECK(java.lang.String)][paymentPreferenceId,null()][pa
>> ymentRefNum,null()][paymentTypeId,VENDOR_PAYMENT(java.lang.String)][roleTypeIdTo,null()][status
>> Id,PMNT_NOT_PAID(java.lang.String)]
>> (SQL Exception while executing the following:INSERT INTO public.PAYMENT (PAYMENT_ID,
>> PAYMENT_TYPE_ID, PAYMENT_METHOD_TYPE_ID, PAYMENT_METHOD_ID, PAYMENT_GATEWAY_RESPONSE_ID,
>> PAYMENT_PREFERENCE_ID, PARTY_ID_FROM, PARTY_ID_TO, ROLE_TYPE_ID_TO, STATUS_ID, EFFECTIVE_DATE,
>> PAYMENT_REF_NUM, AMOUNT, CURRENCY_UOM_ID, COMMENTS, FIN_ACCOUNT_TRANS_ID,
>> OVERRIDE_GL_ACCOUNT_ID, ACTUAL_CURRENCY_AMOUNT, ACTUAL_CURRENCY_UOM_ID, LAST_UPDATED_STAMP,
>> LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
>> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "payment" violates
>> foreign key constraint "payment_fpty")))]
>>
>>
>> www.ethicalshopper.net Fair trade: the alternative choice for your everyday shopping
>> 0845 456 2429
>>
>>
>> WHAT DO YOU DRINK AT WORK?
>> We can supply your organisation with high quality fair trade tea and
>> coffee.  Discounts are available for regular orders.  Contact us for more details.
>


--
Ian Gilbert
www.ethicalshopper.net
Fair trade: the alternative choice for your everyday shopping
0845 456 2429

WHAT DO YOU DRINK AT WORK?
We can supply your organisation with high quality fair trade tea and
coffee.  Discounts are available for regular orders.  Contact us for more
details.