Error displays while creating a new employment from Human Resources.

2011-03-21 Thread monica.das
Hi All,

I am using apache-ofbiz-10.04 stable version. The following error displays
when creating a new employment from Human Resources.

ERROR: Could not complete the Create Employment
[file:/E:/ofbiz10.04_lsvn/apache-ofbiz-10.04/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml#createEmployment]
process [problem creating the newEntity value: Error while inserting:
[GenericEntity:Employment][createdStamp,2011-03-21
13:28:40.105(java.sql.Timestamp)][createdTxStamp,2011-03-21
13:28:39.995(java.sql.Timestamp)][fromDate,2011-04-01
13:28:36.495(java.sql.Timestamp)][lastUpdatedStamp,2011-03-21
13:28:40.105(java.sql.Timestamp)][lastUpdatedTxStamp,2011-03-21
13:28:39.995(java.sql.Timestamp)][partyIdFrom,Company(java.lang.String)][partyIdTo,1(java.lang.String)][roleTypeIdFrom,INTERNAL_ORGANIZATIO(java.lang.String)][roleTypeIdTo,EMPLOYEE(java.lang.String)][terminationReasonId,null()][terminationTypeId,null()][thruDate,null()]
(SQL Exception while executing the following:INSERT INTO OFBIZ.EMPLOYMENT
(ROLE_TYPE_ID_FROM, ROLE_TYPE_ID_TO, PARTY_ID_FROM, PARTY_ID_TO, FROM_DATE,
THRU_DATE, TERMINATION_REASON_ID, TERMINATION_TYPE_ID, LAST_UPDATED_STAMP,
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'EMPLOYMENT' caused a violation of
foreign key constraint 'EMPLMNT_TPTRL' for key (1,EMPLOYEE). The
statement has been rolled back.))]

Any help will be appreciated. 

Thanks
Monica

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Error-displays-while-creating-a-new-employment-from-Human-Resources-tp3392849p3392849.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Display VAT on checkout pages

2011-03-21 Thread Jacques Le Roux

It seems nobody wants to add anything, so at this stage I'd say, yes

Jacques

From: Raj Saini rajsa...@gmail.com

I agree it is better to enhance the existing method.

Should I create a JIRA issue for further discussion?

Thanks,

Raj

On Sunday 20 March 2011 06:05 PM, Jacques Le Roux wrote:

Though I did not look into code yet, I agree with Paul,
I don't think there are currently any countries in the world where you 
have Sale and Vat tax simultaneously. Of course, this could happens 
but I doubt. Anyway counting them both makes sense, even if it's maybe 
a shoot in the dark.


I totally agree on the purchase difference for VAT_TAX vs SALES_TAX. 
I'm not quite sure how is calculated VAT on discount so I have added a 
small explanation at  
https://cwiki.apache.org/confluence/display/OFBIZ/VAT#VAT-Discountsappliedperline


My 2 cts

Jacques

From: Paul Foxworthy p...@cohsoft.com.au

Hi Raj,

I vote for enhancing the existing methods.

If we think of the methods getTotalSalesTax and
getOrderTaxByTaxAuthGeoAndParty as what tax was collected as part of 
the
sale that must be paid to a tax authority? then those methods should 
look

for VAT/GST as well as sales tax.

Maybe there is some place in the world that has both a sales tax and a
VAT/GST. If there was such a place, would you want these methods to 
count
both taxes or not? I think the answer is yes, you would want both 
counted.


To me, the tax types SALES_TAX and VAT_TAX are almost the same thing 
*for a
sale*. In both cases, we're collecting tax which is a liability that 
must be

paid to a tax authority.

The major difference between a VAT/GST tax and a sales tax is we also 
record
the VAT tax we paid on *purchases*, and that affects the overall 
liability

at the time we must pay the tax authority. There's no sales tax on
purchases.

If you grep for SALES_TAX in the Ofbiz code, there are several instances
where there's no mention of VAT_TAX, and yet the business rule should
probably apply to both. I have been intending to do a thorough study 
of all
these instances when I get some time. I believe most of them should  
change

to taxtype == SALES_TAX OR taxtype == VAT_TAX. It seems to me you're
looking at several of those instances right now.

When we summarise tax at the bottom of an order, I think the most
interesting thing to show is total tax of whatever type, and the
getTotalSalesTax method should do that job. The method getTotalSalesTax
could possibly have a more general name, but I don't think that's really
important.

So as I said, I think it would be better to modify the methods. For 
existing
Ofbiz installations that only define tax authorities that collect a 
sales

tax, this change will not break anything at all.

Cheers

Paul Foxworthy


rajsaini wrote:


Hi,

I am working a e-commerce application and using new VAT implementation.
I have a problem showing the VAT adjustment as TAX on cart/checkout
pages. ShoppingCart#getTotalSalesTax and in turn
OrderReadHelper#getOrderTaxByTaxAuthGeoAndParty always returns zero as
it does not consider the OrderAdjusment of VAT_TAX type.

I am working on enhancements and trying to find the best way so that it
is generic and my work could be contributed back to the community.

My question is should we add other method in ShippingCart and
OrderReadHelper classes for VAT or enhance the existing methods to
include the OrderAdjustments of VAT_TAX type.

Thanks,

Raj




--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Display-VAT-on-checkout-pages-tp3386374p3390807.html

Sent from the OFBiz - User mailing list archive at Nabble.com.











Re: removing validations

2011-03-21 Thread monica.das
Go through the practice application to remove and add validation from a
specific page.

https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide

To remove the validation put(optional=false) for the desire field in
services.xml file.

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/removing-validations-tp3344057p3392887.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Error displays while creating a new employment from Human Resources.

2011-03-21 Thread Mike
I tried it with trunk and it seems to work.  It also looks like you can
create an employee by using party with role type Employee.  Try that.

On Mon, Mar 21, 2011 at 12:55 AM, monica.das monica.das2...@gmail.comwrote:

 Hi All,

 I am using apache-ofbiz-10.04 stable version. The following error displays
 when creating a new employment from Human Resources.

 ERROR: Could not complete the Create Employment

 [file:/E:/ofbiz10.04_lsvn/apache-ofbiz-10.04/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml#createEmployment]
 process [problem creating the newEntity value: Error while inserting:
 [GenericEntity:Employment][createdStamp,2011-03-21
 13:28:40.105(java.sql.Timestamp)][createdTxStamp,2011-03-21
 13:28:39.995(java.sql.Timestamp)][fromDate,2011-04-01
 13:28:36.495(java.sql.Timestamp)][lastUpdatedStamp,2011-03-21
 13:28:40.105(java.sql.Timestamp)][lastUpdatedTxStamp,2011-03-21

 13:28:39.995(java.sql.Timestamp)][partyIdFrom,Company(java.lang.String)][partyIdTo,1(java.lang.String)][roleTypeIdFrom,INTERNAL_ORGANIZATIO(java.lang.String)][roleTypeIdTo,EMPLOYEE(java.lang.String)][terminationReasonId,null()][terminationTypeId,null()][thruDate,null()]
 (SQL Exception while executing the following:INSERT INTO OFBIZ.EMPLOYMENT
 (ROLE_TYPE_ID_FROM, ROLE_TYPE_ID_TO, PARTY_ID_FROM, PARTY_ID_TO, FROM_DATE,
 THRU_DATE, TERMINATION_REASON_ID, TERMINATION_TYPE_ID, LAST_UPDATED_STAMP,
 LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?,
 ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'EMPLOYMENT' caused a violation of
 foreign key constraint 'EMPLMNT_TPTRL' for key (1,EMPLOYEE). The
 statement has been rolled back.))]

 Any help will be appreciated.

 Thanks
 Monica

 --
 View this message in context:
 http://ofbiz.135035.n4.nabble.com/Error-displays-while-creating-a-new-employment-from-Human-Resources-tp3392849p3392849.html
 Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: Error displays while creating a new employment from Human Resources.

2011-03-21 Thread monica.das
Thanks a lot. It works fine.

Regards
Monica

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Error-displays-while-creating-a-new-employment-from-Human-Resources-tp3392849p3392965.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Open link in a new tab

2011-03-21 Thread Shereen
Hi All
Is there any option in ofbiz that can enable me to open a new tab or new
window when I click a button?
so instead of navigating to another page i want that page in anew window or
tab
If so how?

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Open-link-in-a-new-tab-tp3393348p3393348.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Open link in a new tab

2011-03-21 Thread Jacques Le Roux

Look for

a target=_blank in FTL
target-window=_BLANK in widgets 


Jacques

Shereen wrote:

Hi All
Is there any option in ofbiz that can enable me to open a new tab or new
window when I click a button?
so instead of navigating to another page i want that page in anew window or
tab
If so how?




Re: Display VAT on checkout pages

2011-03-21 Thread Paul Foxworthy
Bonjour Jacques,

Yes, I agree it's unlikely. I only mentioned it as a thought experiment to
clarify our thoughts on what the method should return.

Cheers

Paul Foxworthy


Jacques Le Roux wrote:
 
 I don't think there are currently any countries in the world where you
 have Sale and Vat tax simultaneously. Of course, this could 
 happens but I doubt. Anyway counting them both makes sense, even if it's
 maybe a shoot in the dark.
 


--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Display-VAT-on-checkout-pages-tp3386374p3395508.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Category Level Price

2011-03-21 Thread Atul Vani
Not sure how good of a solution it is, but you can do it by setting 
price rules too (condition:category, action:flatAmountOverride). Though 
you will need to create some price data for that to work. But things 
will be easily manageable after that.


Thanks  Regards
Atul Vani
Enterprise Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/
We are the Global Leaders in Apache OFBiz, Google 'ofbiz' and see for yourself.


On Thursday 17 March 2011 10:20 PM, Bilgin Ibryam wrote:

On Wed, Mar 16, 2011 at 8:33 AM, Jacques Le Roux
jacques.le.r...@les7arts.com  wrote:

   

Why not use a seed data file, with possible proper import process? It's
easy to edit and, I believe, certainly faster than any specific UI, more
error prone tough (C/P, etc.)...


 

If you don't want to maintain price information for each product separately,
you could override calculateProductPrice service and introduce your custom
price calculating logic based on categories.

Bilgin


   

Jacques

From: araya...@kenfuse.com

  Hi Community,
 

I have a requirement where there are lots of products (upto 50 or more in
cases) under each category. Each of them are different but are priced the
same with same rules etc. Right now the way seems to be setting up pricing
details for each of these products (i.e. default and list price). However,
this is painful for 100s of product if done through the user interface
which
is the preference. To simplify wondering if there is a way to apply some
inheritence based on product's primary category. For example if there are
no
direct price associated can we look for prices associated with the primary
category . If that too is not available then recurse further to its
primary
parent all the way to the top potentially. An example scenario is music
download by style / genre all of which are priced the same and there are
potentially hundreds or thousands of them. Of course would love to
override
the price with a direct product price for cases but generally apply a site
wide pricing. Is this possible? Do advice if there are simpler ways to
model
this or perhaps a support already exists.
Thanks in advance
ar

--
View this message in context:
http://ofbiz.135035.n4.nabble.com/Category-Level-Price-tp3380888p3380888.html
Sent from the OFBiz - User mailing list archive at Nabble.com.