Re: help with updateProductPrice

2018-04-17 Thread Mike
Just make your DB updates, then make an API call or use wget to clear the
cache.  For instance:

wget --no-check-certificate -T 360
https://IP_ADDRESS/webtools/control/FindUtilCacheClearAll?USERNAME=admin&PASSWORD=xxx&JavaScriptEnabled=N

Here's the thing.. Eventually, you're going to make hacks to satisfy
various problems that come up.  Making your own, custom xmlrpc/SOAP/REST is
well within the norm.  If you make one (hack), like to make an easy fast
price updater, you'll start to use the same technique to solve another
problem.  It's great to be a purist (if you can), but you have to have a
way of working around bugs.  Just MHO.

On Tue, Apr 17, 2018 at 10:14 PM, Rajesh Mallah 
wrote:

> Hi Mike  ,
>
> moreover there is the factor of Caching at various levels . If you
> directly interact with DB , i feel the caches may become stale .
>
> regds
> Mallah.
>
> On Tue, Apr 17, 2018 at 9:17 PM, Mike  wrote:
>
> > Why not just write your own custom xmlrpc server (perl/python/java) that
> > accepts just the P/N and new price, searches for the current record, and
> > performs a SQL call to update the DB.
> >
> > On Tue, Apr 17, 2018 at 8:12 AM, Rajesh Mallah 
> > wrote:
> >
> > > ERRATA: I meant "There is no parameter" in lieu of "There is parameter"
> > >
> > > On Tue, Apr 17, 2018 at 8:09 PM, Rajesh Mallah <
> mallah.raj...@gmail.com>
> > > wrote:
> > >
> > > >
> > > > Hi Rishi ,
> > > >
> > > > I am using XML RPC with OFBiz so my capabilities are limited to
> > > > what the interface provides. There is  parameter that allows me
> > > > to specify the data format/pattern .
> > > >
> > > > At this moment i have solved my problem temporarily by appending
> > > > .001 after the second part in HH:MM:SS and i am only using
> > > > createProductPrice instead of updateProductPrice . As creating new
> > > > prices allows to have a history/audit of prices. I feel
> > > updateProductPrice
> > > > is really overwriting the values and trail is lost.
> > > >
> > > > regds
> > > > mallah.
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Apr 17, 2018 at 6:49 PM, Rishi Solanki <
> > rishisolan...@gmail.com>
> > > > wrote:
> > > >
> > > >> Idea of utility class is, use the format you would like and pass the
> > > >> value.
> > > >> It will convert into timestamp used in the table. In case you could
> > not
> > > >> get
> > > >> the desired format in the utility class then the class uses the
> > > >> java.text.SimpleDateFormat class to resolve its purpose.
> > > >>
> > > >> Please take a look at toTimestamp() method variations and format you
> > are
> > > >> receiving in the xml. Once you have the format with you, it can be
> > > easily
> > > >> converted into timestamp. Also if utility class does not support
> then
> > go
> > > >> to
> > > >> core class for same i.e java.text.SimpleDateFormat and look for the
> > > >> supporting format.
> > > >>
> > > >> HTH!
> > > >>
> > > >>
> > > >> Rishi Solanki
> > > >> Sr Manager, Enterprise Software Development
> > > >> HotWax Systems Pvt. Ltd.
> > > >> Direct: +91-9893287847
> > > >> http://www.hotwaxsystems.com
> > > >> www.hotwax.co
> > > >>
> > > >> On Tue, Apr 17, 2018 at 3:02 PM, Rajesh Mallah <
> > mallah.raj...@gmail.com
> > > >
> > > >> wrote:
> > > >>
> > > >> > Further Info:
> > > >> >
> > > >> >   
> > > >> > fromDate
> > > >> > 
> > > >> >   
> > > >> > 
> > > >> >
> > > >> >
> > > >> > In XML results in
> > > >> >
> > > >> > from_date   | 2018-04-17 14:59:34.001+05:30
> > > >> >
> > > >> > in DB. looks like the parser is kind enough to consider TZ
> > > >> > spec without colons.
> > > >> >
> > > >> >
> > > >> > regds
> > > >> > mallah.
> > > >> >
> > > >> >
> > > >> > On Tue, Apr 17, 2018 at 2:42 PM, Rajesh Mallah <
> > > mallah.raj...@gmail.com
> > > >> >
> > > >> > wrote:
> > > >> >
> > > >> > >
> > > >> > > Its PostgreSQL
> > > >> > > regds
> > > >> > >
> > > >> > >
> > > >> > >  below is a sample data :
> > > >> > >
> > > >> > > SQL> select * from  ofbiz.product_price  where
> > > >> > > product_id='PROD_SW52D5H3EN' order by created_date desc limit 1;
> > > >> > >
> > > >> > > -[ RECORD 1 ]---+--
> > > >> > > product_id  | PROD_SW52D5H3EN
> > > >> > > product_price_type_id   | DEFAULT_PRICE
> > > >> > > product_price_purpose_id| PURCHASE
> > > >> > > currency_uom_id | INR
> > > >> > > product_store_group_id  | _NA_
> > > >> > > from_date   | 2018-04-17 12:49:20+05:30<
> > > This
> > > >> has
> > > >> > > been put by me.
> > > >> > > thru_date   |
> > > >> > > price   | 121.000
> > > >> > > term_uom_id | WT_kg
> > > >> > > custom_price_calc_service   |
> > > >> > > price_without_tax   |
> > > >> > > price_with_tax  |
> > > >> > > tax_amount  |
> > > >> > > tax_percentage  |
> > > >> > > tax_auth_par

Re: help with updateProductPrice

2018-04-17 Thread Rajesh Mallah
Hi Mike  ,

moreover there is the factor of Caching at various levels . If you
directly interact with DB , i feel the caches may become stale .

regds
Mallah.

On Tue, Apr 17, 2018 at 9:17 PM, Mike  wrote:

> Why not just write your own custom xmlrpc server (perl/python/java) that
> accepts just the P/N and new price, searches for the current record, and
> performs a SQL call to update the DB.
>
> On Tue, Apr 17, 2018 at 8:12 AM, Rajesh Mallah 
> wrote:
>
> > ERRATA: I meant "There is no parameter" in lieu of "There is parameter"
> >
> > On Tue, Apr 17, 2018 at 8:09 PM, Rajesh Mallah 
> > wrote:
> >
> > >
> > > Hi Rishi ,
> > >
> > > I am using XML RPC with OFBiz so my capabilities are limited to
> > > what the interface provides. There is  parameter that allows me
> > > to specify the data format/pattern .
> > >
> > > At this moment i have solved my problem temporarily by appending
> > > .001 after the second part in HH:MM:SS and i am only using
> > > createProductPrice instead of updateProductPrice . As creating new
> > > prices allows to have a history/audit of prices. I feel
> > updateProductPrice
> > > is really overwriting the values and trail is lost.
> > >
> > > regds
> > > mallah.
> > >
> > >
> > >
> > >
> > > On Tue, Apr 17, 2018 at 6:49 PM, Rishi Solanki <
> rishisolan...@gmail.com>
> > > wrote:
> > >
> > >> Idea of utility class is, use the format you would like and pass the
> > >> value.
> > >> It will convert into timestamp used in the table. In case you could
> not
> > >> get
> > >> the desired format in the utility class then the class uses the
> > >> java.text.SimpleDateFormat class to resolve its purpose.
> > >>
> > >> Please take a look at toTimestamp() method variations and format you
> are
> > >> receiving in the xml. Once you have the format with you, it can be
> > easily
> > >> converted into timestamp. Also if utility class does not support then
> go
> > >> to
> > >> core class for same i.e java.text.SimpleDateFormat and look for the
> > >> supporting format.
> > >>
> > >> HTH!
> > >>
> > >>
> > >> Rishi Solanki
> > >> Sr Manager, Enterprise Software Development
> > >> HotWax Systems Pvt. Ltd.
> > >> Direct: +91-9893287847
> > >> http://www.hotwaxsystems.com
> > >> www.hotwax.co
> > >>
> > >> On Tue, Apr 17, 2018 at 3:02 PM, Rajesh Mallah <
> mallah.raj...@gmail.com
> > >
> > >> wrote:
> > >>
> > >> > Further Info:
> > >> >
> > >> >   
> > >> > fromDate
> > >> > 
> > >> >   
> > >> > 
> > >> >
> > >> >
> > >> > In XML results in
> > >> >
> > >> > from_date   | 2018-04-17 14:59:34.001+05:30
> > >> >
> > >> > in DB. looks like the parser is kind enough to consider TZ
> > >> > spec without colons.
> > >> >
> > >> >
> > >> > regds
> > >> > mallah.
> > >> >
> > >> >
> > >> > On Tue, Apr 17, 2018 at 2:42 PM, Rajesh Mallah <
> > mallah.raj...@gmail.com
> > >> >
> > >> > wrote:
> > >> >
> > >> > >
> > >> > > Its PostgreSQL
> > >> > > regds
> > >> > >
> > >> > >
> > >> > >  below is a sample data :
> > >> > >
> > >> > > SQL> select * from  ofbiz.product_price  where
> > >> > > product_id='PROD_SW52D5H3EN' order by created_date desc limit 1;
> > >> > >
> > >> > > -[ RECORD 1 ]---+--
> > >> > > product_id  | PROD_SW52D5H3EN
> > >> > > product_price_type_id   | DEFAULT_PRICE
> > >> > > product_price_purpose_id| PURCHASE
> > >> > > currency_uom_id | INR
> > >> > > product_store_group_id  | _NA_
> > >> > > from_date   | 2018-04-17 12:49:20+05:30<
> > This
> > >> has
> > >> > > been put by me.
> > >> > > thru_date   |
> > >> > > price   | 121.000
> > >> > > term_uom_id | WT_kg
> > >> > > custom_price_calc_service   |
> > >> > > price_without_tax   |
> > >> > > price_with_tax  |
> > >> > > tax_amount  |
> > >> > > tax_percentage  |
> > >> > > tax_auth_party_id   |
> > >> > > tax_auth_geo_id |
> > >> > > tax_in_price| Y
> > >> > > created_date| 2018-04-17 12:49:20.416+05:30
> > >> > > created_by_user_login   | admin
> > >> > > last_modified_date  | 2018-04-17 12:49:20.416+05:30
> > >> > > last_modified_by_user_login | admin
> > >> > > last_updated_stamp  | 2018-04-17 12:49:20.416+05:30  <
> > >> > > Generated by defaults.
> > >> > > last_updated_tx_stamp   | 2018-04-17 12:49:20.357+05:30
> > >> > > created_stamp   | 2018-04-17 12:49:20.416+05:30
> > >> > > created_tx_stamp| 2018-04-17 12:49:20.357+05:30
> > >> > >
> > >> > >
> > >> > > On Tue, Apr 17, 2018 at 2:39 PM, Deepak Dixit
> > >> >  > >> > > com> wrote:
> > >> > >
> > >> > >> Hi Rajesh,
> > >> > >>
> > >> > >> Could you please share which database you are using?
> > >> > >>
> > >> > >>
> > >> > >> Thanks & Regards
> > >> > >> --
> > >> > >> Deepak Dixit
> > >> > >> www.hot

Best Practice Uploading Sales Orders

2018-04-17 Thread james
When you first launch Ofbiz it is extremely important to upload Open
Sales, Open Purchase Orders, Trial Balances as well as initial inventory
quantities and open accounts receivable and open accounts payable.  This
is a minimum to get a corporate system ready to utilize.  

Now comes the question.  Typically closed sales orders are not imported,
but there comes the issue where a customer wants to return a product
from a closed sales order which is not in Ofbiz.

Question: 

1. Is there a way to create a blanket return not against a sales order?
2. If not is there a way of uploading closed sales order that doesn't
affect financials?

Thanks,

James


Re: help with updateProductPrice

2018-04-17 Thread Rajesh Mallah
Its always not that straightforward. I tend to use webservices  as it
provides
consistent results and you do not have to "reverse engineer" . Moreover
things
should work as advertised (documented) !


On Tue, Apr 17, 2018 at 9:17 PM, Mike  wrote:

> Why not just write your own custom xmlrpc server (perl/python/java) that
> accepts just the P/N and new price, searches for the current record, and
> performs a SQL call to update the DB.
>
> On Tue, Apr 17, 2018 at 8:12 AM, Rajesh Mallah 
> wrote:
>
> > ERRATA: I meant "There is no parameter" in lieu of "There is parameter"
> >
> > On Tue, Apr 17, 2018 at 8:09 PM, Rajesh Mallah 
> > wrote:
> >
> > >
> > > Hi Rishi ,
> > >
> > > I am using XML RPC with OFBiz so my capabilities are limited to
> > > what the interface provides. There is  parameter that allows me
> > > to specify the data format/pattern .
> > >
> > > At this moment i have solved my problem temporarily by appending
> > > .001 after the second part in HH:MM:SS and i am only using
> > > createProductPrice instead of updateProductPrice . As creating new
> > > prices allows to have a history/audit of prices. I feel
> > updateProductPrice
> > > is really overwriting the values and trail is lost.
> > >
> > > regds
> > > mallah.
> > >
> > >
> > >
> > >
> > > On Tue, Apr 17, 2018 at 6:49 PM, Rishi Solanki <
> rishisolan...@gmail.com>
> > > wrote:
> > >
> > >> Idea of utility class is, use the format you would like and pass the
> > >> value.
> > >> It will convert into timestamp used in the table. In case you could
> not
> > >> get
> > >> the desired format in the utility class then the class uses the
> > >> java.text.SimpleDateFormat class to resolve its purpose.
> > >>
> > >> Please take a look at toTimestamp() method variations and format you
> are
> > >> receiving in the xml. Once you have the format with you, it can be
> > easily
> > >> converted into timestamp. Also if utility class does not support then
> go
> > >> to
> > >> core class for same i.e java.text.SimpleDateFormat and look for the
> > >> supporting format.
> > >>
> > >> HTH!
> > >>
> > >>
> > >> Rishi Solanki
> > >> Sr Manager, Enterprise Software Development
> > >> HotWax Systems Pvt. Ltd.
> > >> Direct: +91-9893287847
> > >> http://www.hotwaxsystems.com
> > >> www.hotwax.co
> > >>
> > >> On Tue, Apr 17, 2018 at 3:02 PM, Rajesh Mallah <
> mallah.raj...@gmail.com
> > >
> > >> wrote:
> > >>
> > >> > Further Info:
> > >> >
> > >> >   
> > >> > fromDate
> > >> > 
> > >> >   
> > >> > 
> > >> >
> > >> >
> > >> > In XML results in
> > >> >
> > >> > from_date   | 2018-04-17 14:59:34.001+05:30
> > >> >
> > >> > in DB. looks like the parser is kind enough to consider TZ
> > >> > spec without colons.
> > >> >
> > >> >
> > >> > regds
> > >> > mallah.
> > >> >
> > >> >
> > >> > On Tue, Apr 17, 2018 at 2:42 PM, Rajesh Mallah <
> > mallah.raj...@gmail.com
> > >> >
> > >> > wrote:
> > >> >
> > >> > >
> > >> > > Its PostgreSQL
> > >> > > regds
> > >> > >
> > >> > >
> > >> > >  below is a sample data :
> > >> > >
> > >> > > SQL> select * from  ofbiz.product_price  where
> > >> > > product_id='PROD_SW52D5H3EN' order by created_date desc limit 1;
> > >> > >
> > >> > > -[ RECORD 1 ]---+--
> > >> > > product_id  | PROD_SW52D5H3EN
> > >> > > product_price_type_id   | DEFAULT_PRICE
> > >> > > product_price_purpose_id| PURCHASE
> > >> > > currency_uom_id | INR
> > >> > > product_store_group_id  | _NA_
> > >> > > from_date   | 2018-04-17 12:49:20+05:30<
> > This
> > >> has
> > >> > > been put by me.
> > >> > > thru_date   |
> > >> > > price   | 121.000
> > >> > > term_uom_id | WT_kg
> > >> > > custom_price_calc_service   |
> > >> > > price_without_tax   |
> > >> > > price_with_tax  |
> > >> > > tax_amount  |
> > >> > > tax_percentage  |
> > >> > > tax_auth_party_id   |
> > >> > > tax_auth_geo_id |
> > >> > > tax_in_price| Y
> > >> > > created_date| 2018-04-17 12:49:20.416+05:30
> > >> > > created_by_user_login   | admin
> > >> > > last_modified_date  | 2018-04-17 12:49:20.416+05:30
> > >> > > last_modified_by_user_login | admin
> > >> > > last_updated_stamp  | 2018-04-17 12:49:20.416+05:30  <
> > >> > > Generated by defaults.
> > >> > > last_updated_tx_stamp   | 2018-04-17 12:49:20.357+05:30
> > >> > > created_stamp   | 2018-04-17 12:49:20.416+05:30
> > >> > > created_tx_stamp| 2018-04-17 12:49:20.357+05:30
> > >> > >
> > >> > >
> > >> > > On Tue, Apr 17, 2018 at 2:39 PM, Deepak Dixit
> > >> >  > >> > > com> wrote:
> > >> > >
> > >> > >> Hi Rajesh,
> > >> > >>
> > >> > >> Could you please share which database you are using?
> > >> > >>
> > >> > >>
> > >> > >> Thanks & Regards
> > >> > >> --
> >

Re: help with updateProductPrice

2018-04-17 Thread Mike
Why not just write your own custom xmlrpc server (perl/python/java) that
accepts just the P/N and new price, searches for the current record, and
performs a SQL call to update the DB.

On Tue, Apr 17, 2018 at 8:12 AM, Rajesh Mallah 
wrote:

> ERRATA: I meant "There is no parameter" in lieu of "There is parameter"
>
> On Tue, Apr 17, 2018 at 8:09 PM, Rajesh Mallah 
> wrote:
>
> >
> > Hi Rishi ,
> >
> > I am using XML RPC with OFBiz so my capabilities are limited to
> > what the interface provides. There is  parameter that allows me
> > to specify the data format/pattern .
> >
> > At this moment i have solved my problem temporarily by appending
> > .001 after the second part in HH:MM:SS and i am only using
> > createProductPrice instead of updateProductPrice . As creating new
> > prices allows to have a history/audit of prices. I feel
> updateProductPrice
> > is really overwriting the values and trail is lost.
> >
> > regds
> > mallah.
> >
> >
> >
> >
> > On Tue, Apr 17, 2018 at 6:49 PM, Rishi Solanki 
> > wrote:
> >
> >> Idea of utility class is, use the format you would like and pass the
> >> value.
> >> It will convert into timestamp used in the table. In case you could not
> >> get
> >> the desired format in the utility class then the class uses the
> >> java.text.SimpleDateFormat class to resolve its purpose.
> >>
> >> Please take a look at toTimestamp() method variations and format you are
> >> receiving in the xml. Once you have the format with you, it can be
> easily
> >> converted into timestamp. Also if utility class does not support then go
> >> to
> >> core class for same i.e java.text.SimpleDateFormat and look for the
> >> supporting format.
> >>
> >> HTH!
> >>
> >>
> >> Rishi Solanki
> >> Sr Manager, Enterprise Software Development
> >> HotWax Systems Pvt. Ltd.
> >> Direct: +91-9893287847
> >> http://www.hotwaxsystems.com
> >> www.hotwax.co
> >>
> >> On Tue, Apr 17, 2018 at 3:02 PM, Rajesh Mallah  >
> >> wrote:
> >>
> >> > Further Info:
> >> >
> >> >   
> >> > fromDate
> >> > 
> >> >   
> >> > 
> >> >
> >> >
> >> > In XML results in
> >> >
> >> > from_date   | 2018-04-17 14:59:34.001+05:30
> >> >
> >> > in DB. looks like the parser is kind enough to consider TZ
> >> > spec without colons.
> >> >
> >> >
> >> > regds
> >> > mallah.
> >> >
> >> >
> >> > On Tue, Apr 17, 2018 at 2:42 PM, Rajesh Mallah <
> mallah.raj...@gmail.com
> >> >
> >> > wrote:
> >> >
> >> > >
> >> > > Its PostgreSQL
> >> > > regds
> >> > >
> >> > >
> >> > >  below is a sample data :
> >> > >
> >> > > SQL> select * from  ofbiz.product_price  where
> >> > > product_id='PROD_SW52D5H3EN' order by created_date desc limit 1;
> >> > >
> >> > > -[ RECORD 1 ]---+--
> >> > > product_id  | PROD_SW52D5H3EN
> >> > > product_price_type_id   | DEFAULT_PRICE
> >> > > product_price_purpose_id| PURCHASE
> >> > > currency_uom_id | INR
> >> > > product_store_group_id  | _NA_
> >> > > from_date   | 2018-04-17 12:49:20+05:30<
> This
> >> has
> >> > > been put by me.
> >> > > thru_date   |
> >> > > price   | 121.000
> >> > > term_uom_id | WT_kg
> >> > > custom_price_calc_service   |
> >> > > price_without_tax   |
> >> > > price_with_tax  |
> >> > > tax_amount  |
> >> > > tax_percentage  |
> >> > > tax_auth_party_id   |
> >> > > tax_auth_geo_id |
> >> > > tax_in_price| Y
> >> > > created_date| 2018-04-17 12:49:20.416+05:30
> >> > > created_by_user_login   | admin
> >> > > last_modified_date  | 2018-04-17 12:49:20.416+05:30
> >> > > last_modified_by_user_login | admin
> >> > > last_updated_stamp  | 2018-04-17 12:49:20.416+05:30  <
> >> > > Generated by defaults.
> >> > > last_updated_tx_stamp   | 2018-04-17 12:49:20.357+05:30
> >> > > created_stamp   | 2018-04-17 12:49:20.416+05:30
> >> > > created_tx_stamp| 2018-04-17 12:49:20.357+05:30
> >> > >
> >> > >
> >> > > On Tue, Apr 17, 2018 at 2:39 PM, Deepak Dixit
> >> >  >> > > com> wrote:
> >> > >
> >> > >> Hi Rajesh,
> >> > >>
> >> > >> Could you please share which database you are using?
> >> > >>
> >> > >>
> >> > >> Thanks & Regards
> >> > >> --
> >> > >> Deepak Dixit
> >> > >> www.hotwax.co
> >> > >>
> >> > >> On Tue, Apr 17, 2018 at 2:36 PM, Rajesh Mallah <
> >> mallah.raj...@gmail.com
> >> > >
> >> > >> wrote:
> >> > >>
> >> > >> >  Hi ,
> >> > >> >
> >> > >> >
> >> > >> > it was in conversion/DateTimeConverters.java that was appending
> >> '.0'
> >> > to
> >> > >> > the
> >> > >> > end of
> >> > >> > string if the string did not contain any  decimals. So i have now
> >> > >> started
> >> > >> > sending
> >> > >> > the fractional seconds. And things are better (if not perfect).
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > publ

Re: help with updateProductPrice

2018-04-17 Thread Rajesh Mallah
ERRATA: I meant "There is no parameter" in lieu of "There is parameter"

On Tue, Apr 17, 2018 at 8:09 PM, Rajesh Mallah 
wrote:

>
> Hi Rishi ,
>
> I am using XML RPC with OFBiz so my capabilities are limited to
> what the interface provides. There is  parameter that allows me
> to specify the data format/pattern .
>
> At this moment i have solved my problem temporarily by appending
> .001 after the second part in HH:MM:SS and i am only using
> createProductPrice instead of updateProductPrice . As creating new
> prices allows to have a history/audit of prices. I feel updateProductPrice
> is really overwriting the values and trail is lost.
>
> regds
> mallah.
>
>
>
>
> On Tue, Apr 17, 2018 at 6:49 PM, Rishi Solanki 
> wrote:
>
>> Idea of utility class is, use the format you would like and pass the
>> value.
>> It will convert into timestamp used in the table. In case you could not
>> get
>> the desired format in the utility class then the class uses the
>> java.text.SimpleDateFormat class to resolve its purpose.
>>
>> Please take a look at toTimestamp() method variations and format you are
>> receiving in the xml. Once you have the format with you, it can be easily
>> converted into timestamp. Also if utility class does not support then go
>> to
>> core class for same i.e java.text.SimpleDateFormat and look for the
>> supporting format.
>>
>> HTH!
>>
>>
>> Rishi Solanki
>> Sr Manager, Enterprise Software Development
>> HotWax Systems Pvt. Ltd.
>> Direct: +91-9893287847
>> http://www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Tue, Apr 17, 2018 at 3:02 PM, Rajesh Mallah 
>> wrote:
>>
>> > Further Info:
>> >
>> >   
>> > fromDate
>> > 
>> >   
>> > 
>> >
>> >
>> > In XML results in
>> >
>> > from_date   | 2018-04-17 14:59:34.001+05:30
>> >
>> > in DB. looks like the parser is kind enough to consider TZ
>> > spec without colons.
>> >
>> >
>> > regds
>> > mallah.
>> >
>> >
>> > On Tue, Apr 17, 2018 at 2:42 PM, Rajesh Mallah > >
>> > wrote:
>> >
>> > >
>> > > Its PostgreSQL
>> > > regds
>> > >
>> > >
>> > >  below is a sample data :
>> > >
>> > > SQL> select * from  ofbiz.product_price  where
>> > > product_id='PROD_SW52D5H3EN' order by created_date desc limit 1;
>> > >
>> > > -[ RECORD 1 ]---+--
>> > > product_id  | PROD_SW52D5H3EN
>> > > product_price_type_id   | DEFAULT_PRICE
>> > > product_price_purpose_id| PURCHASE
>> > > currency_uom_id | INR
>> > > product_store_group_id  | _NA_
>> > > from_date   | 2018-04-17 12:49:20+05:30< This
>> has
>> > > been put by me.
>> > > thru_date   |
>> > > price   | 121.000
>> > > term_uom_id | WT_kg
>> > > custom_price_calc_service   |
>> > > price_without_tax   |
>> > > price_with_tax  |
>> > > tax_amount  |
>> > > tax_percentage  |
>> > > tax_auth_party_id   |
>> > > tax_auth_geo_id |
>> > > tax_in_price| Y
>> > > created_date| 2018-04-17 12:49:20.416+05:30
>> > > created_by_user_login   | admin
>> > > last_modified_date  | 2018-04-17 12:49:20.416+05:30
>> > > last_modified_by_user_login | admin
>> > > last_updated_stamp  | 2018-04-17 12:49:20.416+05:30  <
>> > > Generated by defaults.
>> > > last_updated_tx_stamp   | 2018-04-17 12:49:20.357+05:30
>> > > created_stamp   | 2018-04-17 12:49:20.416+05:30
>> > > created_tx_stamp| 2018-04-17 12:49:20.357+05:30
>> > >
>> > >
>> > > On Tue, Apr 17, 2018 at 2:39 PM, Deepak Dixit
>> > > > > com> wrote:
>> > >
>> > >> Hi Rajesh,
>> > >>
>> > >> Could you please share which database you are using?
>> > >>
>> > >>
>> > >> Thanks & Regards
>> > >> --
>> > >> Deepak Dixit
>> > >> www.hotwax.co
>> > >>
>> > >> On Tue, Apr 17, 2018 at 2:36 PM, Rajesh Mallah <
>> mallah.raj...@gmail.com
>> > >
>> > >> wrote:
>> > >>
>> > >> >  Hi ,
>> > >> >
>> > >> >
>> > >> > it was in conversion/DateTimeConverters.java that was appending
>> '.0'
>> > to
>> > >> > the
>> > >> > end of
>> > >> > string if the string did not contain any  decimals. So i have now
>> > >> started
>> > >> > sending
>> > >> > the fractional seconds. And things are better (if not perfect).
>> > >> >
>> > >> >
>> > >> >
>> > >> > public java.sql.Timestamp convert(String obj, Locale locale,
>> TimeZone
>> > >> > timeZone, String formatString) throws ConversionException {
>> > >> > String str = obj.trim();
>> > >> > if (str.length() == 0) {
>> > >> > return null;
>> > >> > }
>> > >> > DateFormat df = null;
>> > >> > if (UtilValidate.isEmpty(formatString)) {
>> > >> > // These hacks are a bad idea, but they are
>> included
>> > >> > // for backward compatibility.
>> > >> > if (str.length() 

Re: help with updateProductPrice

2018-04-17 Thread Rajesh Mallah
Hi Rishi ,

I am using XML RPC with OFBiz so my capabilities are limited to
what the interface provides. There is  parameter that allows me
to specify the data format/pattern .

At this moment i have solved my problem temporarily by appending
.001 after the second part in HH:MM:SS and i am only using
createProductPrice instead of updateProductPrice . As creating new
prices allows to have a history/audit of prices. I feel updateProductPrice
is really overwriting the values and trail is lost.

regds
mallah.




On Tue, Apr 17, 2018 at 6:49 PM, Rishi Solanki 
wrote:

> Idea of utility class is, use the format you would like and pass the value.
> It will convert into timestamp used in the table. In case you could not get
> the desired format in the utility class then the class uses the
> java.text.SimpleDateFormat class to resolve its purpose.
>
> Please take a look at toTimestamp() method variations and format you are
> receiving in the xml. Once you have the format with you, it can be easily
> converted into timestamp. Also if utility class does not support then go to
> core class for same i.e java.text.SimpleDateFormat and look for the
> supporting format.
>
> HTH!
>
>
> Rishi Solanki
> Sr Manager, Enterprise Software Development
> HotWax Systems Pvt. Ltd.
> Direct: +91-9893287847
> http://www.hotwaxsystems.com
> www.hotwax.co
>
> On Tue, Apr 17, 2018 at 3:02 PM, Rajesh Mallah 
> wrote:
>
> > Further Info:
> >
> >   
> > fromDate
> > 
> >   
> > 
> >
> >
> > In XML results in
> >
> > from_date   | 2018-04-17 14:59:34.001+05:30
> >
> > in DB. looks like the parser is kind enough to consider TZ
> > spec without colons.
> >
> >
> > regds
> > mallah.
> >
> >
> > On Tue, Apr 17, 2018 at 2:42 PM, Rajesh Mallah 
> > wrote:
> >
> > >
> > > Its PostgreSQL
> > > regds
> > >
> > >
> > >  below is a sample data :
> > >
> > > SQL> select * from  ofbiz.product_price  where
> > > product_id='PROD_SW52D5H3EN' order by created_date desc limit 1;
> > >
> > > -[ RECORD 1 ]---+--
> > > product_id  | PROD_SW52D5H3EN
> > > product_price_type_id   | DEFAULT_PRICE
> > > product_price_purpose_id| PURCHASE
> > > currency_uom_id | INR
> > > product_store_group_id  | _NA_
> > > from_date   | 2018-04-17 12:49:20+05:30< This
> has
> > > been put by me.
> > > thru_date   |
> > > price   | 121.000
> > > term_uom_id | WT_kg
> > > custom_price_calc_service   |
> > > price_without_tax   |
> > > price_with_tax  |
> > > tax_amount  |
> > > tax_percentage  |
> > > tax_auth_party_id   |
> > > tax_auth_geo_id |
> > > tax_in_price| Y
> > > created_date| 2018-04-17 12:49:20.416+05:30
> > > created_by_user_login   | admin
> > > last_modified_date  | 2018-04-17 12:49:20.416+05:30
> > > last_modified_by_user_login | admin
> > > last_updated_stamp  | 2018-04-17 12:49:20.416+05:30  <
> > > Generated by defaults.
> > > last_updated_tx_stamp   | 2018-04-17 12:49:20.357+05:30
> > > created_stamp   | 2018-04-17 12:49:20.416+05:30
> > > created_tx_stamp| 2018-04-17 12:49:20.357+05:30
> > >
> > >
> > > On Tue, Apr 17, 2018 at 2:39 PM, Deepak Dixit
> >  > > com> wrote:
> > >
> > >> Hi Rajesh,
> > >>
> > >> Could you please share which database you are using?
> > >>
> > >>
> > >> Thanks & Regards
> > >> --
> > >> Deepak Dixit
> > >> www.hotwax.co
> > >>
> > >> On Tue, Apr 17, 2018 at 2:36 PM, Rajesh Mallah <
> mallah.raj...@gmail.com
> > >
> > >> wrote:
> > >>
> > >> >  Hi ,
> > >> >
> > >> >
> > >> > it was in conversion/DateTimeConverters.java that was appending
> '.0'
> > to
> > >> > the
> > >> > end of
> > >> > string if the string did not contain any  decimals. So i have now
> > >> started
> > >> > sending
> > >> > the fractional seconds. And things are better (if not perfect).
> > >> >
> > >> >
> > >> >
> > >> > public java.sql.Timestamp convert(String obj, Locale locale,
> TimeZone
> > >> > timeZone, String formatString) throws ConversionException {
> > >> > String str = obj.trim();
> > >> > if (str.length() == 0) {
> > >> > return null;
> > >> > }
> > >> > DateFormat df = null;
> > >> > if (UtilValidate.isEmpty(formatString)) {
> > >> > // These hacks are a bad idea, but they are included
> > >> > // for backward compatibility.
> > >> > if (str.length() > 0 && !str.contains(":")) {
> > >> > str = str + " 00:00:00.00";
> > >> > }
> > >> > // hack to mimic Timestamp.valueOf() method
> > >> > if (str.length() > 0 && !str.contains(".")) {
> > >> > str = str + ".0";
> > >> >   

Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Jacques Le Roux

Hi Mathieu,

Le 17/04/2018 à 12:22, Mathieu Lirzin a écrit :

Hello Jacques,

Jacques Le Roux  writes:


Le 17/04/2018 à 11:33, Mathieu Lirzin a écrit :

Sharan Foga  writes:


I couldn't find your name in the list of people who have an
ICLA. Please can you complete one. We ask all contributors to complete
one before we give access to our wiki.

Indeed I was unaware of this requirement.  Maybe the wording in [1]
should be changed to make it clear that signing an ICLA is a
requirement.  Additionally it would be nice it was giving some
information regarding the license upon which wiki contributions are
made.

Obviously it's ASL2 since you send your ICLA to the ASF ;)

Sorry I am not used to the Apache way.  :-)

I would expect the ASL2 to require somekind of copying statement on each
wiki page.  No?

I don't think it's needed. Maybe a small sentence could be added to the header 
that currently says:
    "Access to add and change pages is restricted. See: 
https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access";
I'm not sure it's worth it, what others think, especially Sharan?

Jacques



Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Jacques Le Roux

Hi Chris,

Thanks for the idea but this is not in hour hands but ASF infra team 
http://www.apache.org/dev/infra-contact

Only moderation is.

Sincerely the ASF uses ezmlm  for handling its 
ML, and I doubt the infra will change anything there ;)

Imagine, the infra team is a handful of guys and they handle tons of MLs

Jacques


Le 17/04/2018 à 14:21, Chris Clark a écrit :

No what you guys should is this...

Have a list of maillist users in an array... say mailListUsers

On all incoming mail to the mail list do some soft of
indexOf(mailListUsers);

Than a conditional

if indexOf(mailListUsers) > -1 {
 sendMail... (However you do it)
};
if indexOf(mailListUsers) < 0 {
 forwardMailAsUserModerated... (However you do it)
 sendRegVerifiyeMail (as if new user was registering)
};


Just my 2 cents



On Tue, Apr 17, 2018, 5:22 AM Mathieu Lirzin, 
wrote:


Hello Jacques,

Jacques Le Roux  writes:


Le 17/04/2018 à 11:33, Mathieu Lirzin a écrit :

Sharan Foga  writes:


I couldn't find your name in the list of people who have an
ICLA. Please can you complete one. We ask all contributors to complete
one before we give access to our wiki.

Indeed I was unaware of this requirement.  Maybe the wording in [1]
should be changed to make it clear that signing an ICLA is a
requirement.  Additionally it would be nice it was giving some
information regarding the license upon which wiki contributions are
made.

Obviously it's ASL2 since you send your ICLA to the ASF ;)

Sorry I am not used to the Apache way.  :-)

I would expect the ASL2 to require somekind of copying statement on each
wiki page.  No?


You can find details of how to do it on our contributors page:



https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Contributors

I will send my ICLA to  soon.

Do you need some kind of notification when this is done?

[1] https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

Actually no, we (PMC in private ML) receive this information by the

secretary

OK, thanks for the information.

--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37





RE: Price Rule Engine

2018-04-17 Thread james
Scott Thanks a Bunch!  I just solved my question below with your help. 
I added 3 actions.  

-100% of List
100% Average Cost
Percent of Margin

...and it worked perfectly.

Final questions. 
1. Is there away that the system can default all users to List Price
instead of Default Price?
2. Is there a way to have a percent of Wholesale price list?

 Original Message 
Subject: RE: Price Rule Engine
From: 
Date: Tue, April 17, 2018 5:18 am
To: user@ofbiz.apache.org

That sounds awesome! So how does two actions work with each other.

How would you configure the following using multiple actions!

Avg Cost + Percent of Margin 

Thanks Scott!!

 Original Message 
Subject: Re: Price Rule Engine
From: Rishi Solanki 
Date: Tue, April 17, 2018 1:44 am
To: ofbizuser 

+1 it will work for sure.

Thank you Scott for the trick, loving it. Thanks again!

Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Tue, Apr 17, 2018 at 11:45 AM, Scott Gray

wrote:

> Have you tried setting the list price to zero? Alternatively, if you want
> to maintain a value in list price then use two price rule actions:
> 1. Percentage of list price: -100
> 2. Percentage of average cost: 130
>
> That should set the first modifier to effectively zero the starting price,
> and then can add your average cost modifier.
>
> Regards
> Scott
>
> On 17 April 2018 at 03:03,  wrote:
>
> > I am sure there has to be a way to genrerate a price rule without always
> > adding and subtracting to or from List Price.
> >
> > What if I wanted to at cost plus? Or wholesale minus? Or a discount
> > against the gross margin?
> >
> > Or what if I wanted to sell at the default price list or just sell at
> > the Wholesale price list?
> >
> >  Original Message 
> > Subject: Re: Price Rule Engine
> > From: Rishi Solanki 
> > Date: Fri, April 06, 2018 1:43 am
> > To: ofbizuser 
> >
> > Please go thru the calculateProductPrice service it will have all
> > information.
> >
> > Rishi Solanki
> > Sr Manager, Enterprise Software Development
> > HotWax Systems Pvt. Ltd.
> > Direct: +91-9893287847
> > http://www.hotwaxsystems.com
> > www.hotwax.co
> >
> > On Thu, Apr 5, 2018 at 10:33 PM,  wrote:
> >
> > > Thanks Rishi. I think we will need to customize it to give a few new
> > > actions that are purely based off of costs. Do you know what entity we
> > > would need to look to customize? I am thinking we would need to
> > > duplicate every action that is there but have it add to the Average
> > > Costs and Not List
> > >
> > > On a side note... Is it possible to create pricing based on the
> > > warehouse that the product is shipping out of?
> > >
> > >  Original Message 
> > > Subject: Re: Price Rule Engine
> > > From: Rishi Solanki 
> > > Date: Thu, April 05, 2018 6:06 am
> > > To: ofbizuser 
> > >
> > > Aha, sorry I forgot this while giving the solution. OOTB it is not
> > > possible, but a trick of matching the average cost and list price would
> > > work.
> > > 100 is the avg cost and same list price (ECA rule to match them
> always).
> > > Adding rule on avg cost will always sale the product on the price you
> > > want.
> > >
> > > As mentioned OOTB not supported, you may like to customize it, as
> > > required.
> > >
> > > Rishi Solanki
> > > Sr Manager, Enterprise Software Development
> > > HotWax Systems Pvt. Ltd.
> > > Direct: +91-9893287847
> > > http://www.hotwaxsystems.com
> > > www.hotwax.co
> > >
> > > On Thu, Apr 5, 2018 at 6:26 PM,  wrote:
> > >
> > > > In case product's average cost change then you can create a price
> rule
> > > > action such that Percent Of Average Cost (PRICE_POAC) to 130 percent.
> > > > Then
> > > > system will always sale the product on that rule.
> > > >
> > > > The issue with the price rule you mentioned is that the system would
> > add
> > > > 130 percent of costs to the list price. I want just the 130 Percent
> of
> > > > Average Costs without adding that to the list price. Is that
> possible?
> > > >
> > > >  Original Message 
> > > > Subject: Re: Price Rule Engine
> > > > From: Rishi Solanki 
> > > > Date: Thu, April 05, 2018 5:10 am
> > > > To: ofbizuser 
> > > >
> > > > James,
> > > >
> > > > If you wanted to set list price as 30% of average cost, then there is
> > no
> > > > direct mechanism. You may need to set the average price for product
> and
> > > > service to do that.
> > > > In case product's average cost change then you can create a price
> rule
> > > > action such that Percent Of Average Cost (PRICE_POAC) to 130 percent.
> > > > Then
> > > > system will always sale the product on that rule.
> > > > Please refer: Catalog >> Price Rules >> Edit Price Rules >> Action
> Type
> > > > Section.
> > > >
> > > > Current Ecommerce Portal and price engine expect list price always.
> So
> > > > setting list price and adding rule on Average Cost works for y

Re: help with updateProductPrice

2018-04-17 Thread Rishi Solanki
Idea of utility class is, use the format you would like and pass the value.
It will convert into timestamp used in the table. In case you could not get
the desired format in the utility class then the class uses the
java.text.SimpleDateFormat class to resolve its purpose.

Please take a look at toTimestamp() method variations and format you are
receiving in the xml. Once you have the format with you, it can be easily
converted into timestamp. Also if utility class does not support then go to
core class for same i.e java.text.SimpleDateFormat and look for the
supporting format.

HTH!


Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Tue, Apr 17, 2018 at 3:02 PM, Rajesh Mallah 
wrote:

> Further Info:
>
>   
> fromDate
> 
>   
> 
>
>
> In XML results in
>
> from_date   | 2018-04-17 14:59:34.001+05:30
>
> in DB. looks like the parser is kind enough to consider TZ
> spec without colons.
>
>
> regds
> mallah.
>
>
> On Tue, Apr 17, 2018 at 2:42 PM, Rajesh Mallah 
> wrote:
>
> >
> > Its PostgreSQL
> > regds
> >
> >
> >  below is a sample data :
> >
> > SQL> select * from  ofbiz.product_price  where
> > product_id='PROD_SW52D5H3EN' order by created_date desc limit 1;
> >
> > -[ RECORD 1 ]---+--
> > product_id  | PROD_SW52D5H3EN
> > product_price_type_id   | DEFAULT_PRICE
> > product_price_purpose_id| PURCHASE
> > currency_uom_id | INR
> > product_store_group_id  | _NA_
> > from_date   | 2018-04-17 12:49:20+05:30< This has
> > been put by me.
> > thru_date   |
> > price   | 121.000
> > term_uom_id | WT_kg
> > custom_price_calc_service   |
> > price_without_tax   |
> > price_with_tax  |
> > tax_amount  |
> > tax_percentage  |
> > tax_auth_party_id   |
> > tax_auth_geo_id |
> > tax_in_price| Y
> > created_date| 2018-04-17 12:49:20.416+05:30
> > created_by_user_login   | admin
> > last_modified_date  | 2018-04-17 12:49:20.416+05:30
> > last_modified_by_user_login | admin
> > last_updated_stamp  | 2018-04-17 12:49:20.416+05:30  <
> > Generated by defaults.
> > last_updated_tx_stamp   | 2018-04-17 12:49:20.357+05:30
> > created_stamp   | 2018-04-17 12:49:20.416+05:30
> > created_tx_stamp| 2018-04-17 12:49:20.357+05:30
> >
> >
> > On Tue, Apr 17, 2018 at 2:39 PM, Deepak Dixit
>  > com> wrote:
> >
> >> Hi Rajesh,
> >>
> >> Could you please share which database you are using?
> >>
> >>
> >> Thanks & Regards
> >> --
> >> Deepak Dixit
> >> www.hotwax.co
> >>
> >> On Tue, Apr 17, 2018 at 2:36 PM, Rajesh Mallah  >
> >> wrote:
> >>
> >> >  Hi ,
> >> >
> >> >
> >> > it was in conversion/DateTimeConverters.java that was appending '.0'
> to
> >> > the
> >> > end of
> >> > string if the string did not contain any  decimals. So i have now
> >> started
> >> > sending
> >> > the fractional seconds. And things are better (if not perfect).
> >> >
> >> >
> >> >
> >> > public java.sql.Timestamp convert(String obj, Locale locale, TimeZone
> >> > timeZone, String formatString) throws ConversionException {
> >> > String str = obj.trim();
> >> > if (str.length() == 0) {
> >> > return null;
> >> > }
> >> > DateFormat df = null;
> >> > if (UtilValidate.isEmpty(formatString)) {
> >> > // These hacks are a bad idea, but they are included
> >> > // for backward compatibility.
> >> > if (str.length() > 0 && !str.contains(":")) {
> >> > str = str + " 00:00:00.00";
> >> > }
> >> > // hack to mimic Timestamp.valueOf() method
> >> > if (str.length() > 0 && !str.contains(".")) {
> >> > str = str + ".0";
> >> > } else {
> >> > // DateFormat has a funny way of parsing
> >> milliseconds:
> >> > // 00:00:00.2 parses to 00:00:00.002
> >> > // so we'll add zeros to the end to get
> 00:00:00.200
> >> > String[] timeSplit = str.split("[.]");
> >> > if (timeSplit.length > 1 && timeSplit[1].length()
> <
> >> 3)
> >> > {
> >> > str = str + "000".substring(timeSplit[1].
> >> > length());
> >> > }
> >> > }
> >> > df =
> >> > UtilDateTime.toDateTimeFormat(UtilDateTime.getDateTimeFormat(),
> >> timeZone,
> >> > locale);
> >> > } else {
> >> > df = UtilDateTime.toDateTimeFormat(formatString,
> >> timeZone,
> >> > locale);
> >> > }
> >> > try {
> >> >

Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Chris Clark
No what you guys should is this...

Have a list of maillist users in an array... say mailListUsers

On all incoming mail to the mail list do some soft of
indexOf(mailListUsers);

Than a conditional

if indexOf(mailListUsers) > -1 {
sendMail... (However you do it)
};
if indexOf(mailListUsers) < 0 {
forwardMailAsUserModerated... (However you do it)
sendRegVerifiyeMail (as if new user was registering)
};


Just my 2 cents



On Tue, Apr 17, 2018, 5:22 AM Mathieu Lirzin, 
wrote:

> Hello Jacques,
>
> Jacques Le Roux  writes:
>
> > Le 17/04/2018 à 11:33, Mathieu Lirzin a écrit :
> >>
> >> Sharan Foga  writes:
> >>
> >>> I couldn't find your name in the list of people who have an
> >>> ICLA. Please can you complete one. We ask all contributors to complete
> >>> one before we give access to our wiki.
> >> Indeed I was unaware of this requirement.  Maybe the wording in [1]
> >> should be changed to make it clear that signing an ICLA is a
> >> requirement.  Additionally it would be nice it was giving some
> >> information regarding the license upon which wiki contributions are
> >> made.
> > Obviously it's ASL2 since you send your ICLA to the ASF ;)
>
> Sorry I am not used to the Apache way.  :-)
>
> I would expect the ASL2 to require somekind of copying statement on each
> wiki page.  No?
>
> >>> You can find details of how to do it on our contributors page:
> >>>
> >>>
> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Contributors
> >> I will send my ICLA to  soon.
> >>
> >> Do you need some kind of notification when this is done?
> >>
> >> [1] https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access
> > Actually no, we (PMC in private ML) receive this information by the
> secretary
>
> OK, thanks for the information.
>
> --
> Mathieu Lirzin
> GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37
>


RE: Price Rule Engine

2018-04-17 Thread james
That sounds awesome!  So how does two actions work with each other.

How would you configure the following using multiple actions!

Avg Cost + Percent of Margin 

Thanks Scott!!

 Original Message 
Subject: Re: Price Rule Engine
From: Rishi Solanki 
Date: Tue, April 17, 2018 1:44 am
To: ofbizuser 

+1 it will work for sure.

Thank you Scott for the trick, loving it. Thanks again!

Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Tue, Apr 17, 2018 at 11:45 AM, Scott Gray

wrote:

> Have you tried setting the list price to zero? Alternatively, if you want
> to maintain a value in list price then use two price rule actions:
> 1. Percentage of list price: -100
> 2. Percentage of average cost: 130
>
> That should set the first modifier to effectively zero the starting price,
> and then can add your average cost modifier.
>
> Regards
> Scott
>
> On 17 April 2018 at 03:03,  wrote:
>
> > I am sure there has to be a way to genrerate a price rule without always
> > adding and subtracting to or from List Price.
> >
> > What if I wanted to at cost plus? Or wholesale minus? Or a discount
> > against the gross margin?
> >
> > Or what if I wanted to sell at the default price list or just sell at
> > the Wholesale price list?
> >
> >  Original Message 
> > Subject: Re: Price Rule Engine
> > From: Rishi Solanki 
> > Date: Fri, April 06, 2018 1:43 am
> > To: ofbizuser 
> >
> > Please go thru the calculateProductPrice service it will have all
> > information.
> >
> > Rishi Solanki
> > Sr Manager, Enterprise Software Development
> > HotWax Systems Pvt. Ltd.
> > Direct: +91-9893287847
> > http://www.hotwaxsystems.com
> > www.hotwax.co
> >
> > On Thu, Apr 5, 2018 at 10:33 PM,  wrote:
> >
> > > Thanks Rishi. I think we will need to customize it to give a few new
> > > actions that are purely based off of costs. Do you know what entity we
> > > would need to look to customize? I am thinking we would need to
> > > duplicate every action that is there but have it add to the Average
> > > Costs and Not List
> > >
> > > On a side note... Is it possible to create pricing based on the
> > > warehouse that the product is shipping out of?
> > >
> > >  Original Message 
> > > Subject: Re: Price Rule Engine
> > > From: Rishi Solanki 
> > > Date: Thu, April 05, 2018 6:06 am
> > > To: ofbizuser 
> > >
> > > Aha, sorry I forgot this while giving the solution. OOTB it is not
> > > possible, but a trick of matching the average cost and list price would
> > > work.
> > > 100 is the avg cost and same list price (ECA rule to match them
> always).
> > > Adding rule on avg cost will always sale the product on the price you
> > > want.
> > >
> > > As mentioned OOTB not supported, you may like to customize it, as
> > > required.
> > >
> > > Rishi Solanki
> > > Sr Manager, Enterprise Software Development
> > > HotWax Systems Pvt. Ltd.
> > > Direct: +91-9893287847
> > > http://www.hotwaxsystems.com
> > > www.hotwax.co
> > >
> > > On Thu, Apr 5, 2018 at 6:26 PM,  wrote:
> > >
> > > > In case product's average cost change then you can create a price
> rule
> > > > action such that Percent Of Average Cost (PRICE_POAC) to 130 percent.
> > > > Then
> > > > system will always sale the product on that rule.
> > > >
> > > > The issue with the price rule you mentioned is that the system would
> > add
> > > > 130 percent of costs to the list price. I want just the 130 Percent
> of
> > > > Average Costs without adding that to the list price. Is that
> possible?
> > > >
> > > >  Original Message 
> > > > Subject: Re: Price Rule Engine
> > > > From: Rishi Solanki 
> > > > Date: Thu, April 05, 2018 5:10 am
> > > > To: ofbizuser 
> > > >
> > > > James,
> > > >
> > > > If you wanted to set list price as 30% of average cost, then there is
> > no
> > > > direct mechanism. You may need to set the average price for product
> and
> > > > service to do that.
> > > > In case product's average cost change then you can create a price
> rule
> > > > action such that Percent Of Average Cost (PRICE_POAC) to 130 percent.
> > > > Then
> > > > system will always sale the product on that rule.
> > > > Please refer: Catalog >> Price Rules >> Edit Price Rules >> Action
> Type
> > > > Section.
> > > >
> > > > Current Ecommerce Portal and price engine expect list price always.
> So
> > > > setting list price and adding rule on Average Cost works for you, if
> > I'm
> > > > getting your problem correctly.
> > > >
> > > > HTH!
> > > >
> > > >
> > > > Rishi Solanki
> > > > Sr Manager, Enterprise Software Development
> > > > HotWax Systems Pvt. Ltd.
> > > > Direct: +91-9893287847
> > > > http://www.hotwaxsystems.com
> > > > www.hotwax.co
> > > >
> > > > On Thu, Apr 5, 2018 at 5:12 PM,  wrote:
> > > >
> > > > > The issue with the pricing engine is that the system is always
> trying
> > > to
> > > > > add to List Price so once it

Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Jacques Le Roux

Hi Deepak,

It's great to have the  [MODERATE EMAIL] prefix on the 1st moderated message. But then people reuse the subject prefix w/o removing the prefix and 
it's confusing.


I think we should not add this prefix to avoid this confusion

Thanks

Jacques


Le 17/04/2018 à 06:32, Deepak Dixit a écrit :

Hi Mathieu Lirzin,

Your email has been moderated, please subscribe mailing list
http://ofbiz.apache.org/mailing-lists.html

Regarding wiki edit access, Please refer Wiki access


Thanks & Regards
--
Deepak Dixit
Director of Product Engineering
HotWax Commerce 


-- Forwarded message --
From: Mathieu Lirzin 
To: user@ofbiz.apache.org
Cc:
Bcc:
Date: Mon, 16 Apr 2018 17:33:21 +0200
Subject: Wiki edit request
Hello,

I would like to be able to edit the confluence Wiki.

My confluence username: mlirzin

Thanks.





Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Mathieu Lirzin
Hello Jacques,

Jacques Le Roux  writes:

> Le 17/04/2018 à 11:33, Mathieu Lirzin a écrit :
>>
>> Sharan Foga  writes:
>>
>>> I couldn't find your name in the list of people who have an
>>> ICLA. Please can you complete one. We ask all contributors to complete
>>> one before we give access to our wiki.
>> Indeed I was unaware of this requirement.  Maybe the wording in [1]
>> should be changed to make it clear that signing an ICLA is a
>> requirement.  Additionally it would be nice it was giving some
>> information regarding the license upon which wiki contributions are
>> made.
> Obviously it's ASL2 since you send your ICLA to the ASF ;)

Sorry I am not used to the Apache way.  :-)

I would expect the ASL2 to require somekind of copying statement on each
wiki page.  No?

>>> You can find details of how to do it on our contributors page:
>>>
>>> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Contributors
>> I will send my ICLA to  soon.
>>
>> Do you need some kind of notification when this is done?
>>
>> [1] https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access
> Actually no, we (PMC in private ML) receive this information by the secretary

OK, thanks for the information.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37


Re: How to resolve CSRF attack

2018-04-17 Thread Chris Clark
Ahh ok makes sense, you know to first sign up for the list serv before you
hit it up xD...

On Tue, Apr 17, 2018, 4:27 AM Jacques Le Roux, 
wrote:

> It means that the person sends a message to the ML w/o being subscribed to
> it. So we (moderators) have to allow this message to pass.
>
> Jacques
>
>
> Le 17/04/2018 à 04:49, Chris Clark a écrit :
> > What does yoyr message has been moderated mean?
> >
> > On Mon, Apr 16, 2018, 3:00 AM Sonali Agrahari, <
> sonaliagraha...@gmail.com>
> > wrote:
> >
> >> Hello all,
> >>
> >>I am using OFBiz 12.04 version in my application.
> >>When logged in to the application as admin user and open web mail in
> >> another browser , suppose we received a mail  which have link
> >> http://xyz.com/activate.html .
> >> The links points to html file as :
> >>
> >> 
> >>   
> >>
> >> 
> >> 
> >> >> "https://localhost:8443/catalog/control/CreateProductCategory"; name =
> "f1"
> >> id = "f1" method = "post">
> >>value =
> >> "SECTOR" >
> >> value
> >> =
> >> "PRODUCT" >
> >>
> >>
> >> 
> >> 
> >>
> >> The user clicks on this link while he has logged on to the application.
> As
> >> the crafted form is doing a post request in a valid session, the
> requested
> >> post gets executed and result will be displayed i.e. all values will be
> >> inserted in database properly.
> >> And the link gets opened in other tab of same browser.
> >>
> >> How can resolve this type of vulnerability.
> >> Kindly help.
> >>
> >>
> >> Thanks & regards
> >> Sonali
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
> >>
>
>


Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Sharan Foga
Hi Mathieu

No worries. Normally when people request access to our wiki, if they don’t have 
an ICLA then I send them the link to the contributors page to take a look at 
because it includes a link to the discussion about introducing it, when it was 
introduced (in November 2014)  and what it means to sign an ICLA.  A link to 
the original discussion link is here : https://s.apache.org/N0sF

I’ll try and explain from my perspective. The details on the wiki are an 
important part of the project just like the OFBiz code. Everything we do as a 
project is done under the Apache Licence which simply means it open and free 
for anyone to use. Signing an ICLA means that you understand that anything you 
contribute  (or want to contribute) is done so under the Apache Licence and 
that you are happy to do this.

As Jacques mentioned, for the notification, once the ICLA is filed, the PMC 
gets an notification directly from the secretary

Hope this helps

Thanks
Sharan


On 2018/04/17 09:55:57, Jacques Le Roux  wrote: 
> Hi  Mathieu,
> 
> Le 17/04/2018 à 11:33, Mathieu Lirzin a écrit :
> > Hello Sharan,
> >
> > Sharan Foga  writes:
> >
> >> I couldn't find your name in the list of people who have an
> >> ICLA. Please can you complete one. We ask all contributors to complete
> >> one before we give access to our wiki.
> > Indeed I was unaware of this requirement.  Maybe the wording in [1]
> > should be changed to make it clear that signing an ICLA is a
> > requirement.  Additionally it would be nice it was giving some
> > information regarding the license upon which wiki contributions are
> > made.
> Obviously it's ASL2 since you send your ICLA to the ASF ;)
> 
> > While I have no problem signing an ICLA, I found it a bit surprising to
> > have such requirement for editing a wiki.  Do you know the rationale of
> > this?
> I also then wondered about that. But I guess Sharan can explain that.
> 
> >> You can find details of how to do it on our contributors page:
> >>
> >> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Contributors
> > I will send my ICLA to  soon.
> >
> > Do you need some kind of notification when this is done?
> >
> > [1] https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access
> Actually no, we (PMC in private ML) receive this information by the secretary
> 
> Jacques
> >
> > Thanks.
> >
> 
> 


Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Jacques Le Roux

Hi  Mathieu,

Le 17/04/2018 à 11:33, Mathieu Lirzin a écrit :

Hello Sharan,

Sharan Foga  writes:


I couldn't find your name in the list of people who have an
ICLA. Please can you complete one. We ask all contributors to complete
one before we give access to our wiki.

Indeed I was unaware of this requirement.  Maybe the wording in [1]
should be changed to make it clear that signing an ICLA is a
requirement.  Additionally it would be nice it was giving some
information regarding the license upon which wiki contributions are
made.

Obviously it's ASL2 since you send your ICLA to the ASF ;)


While I have no problem signing an ICLA, I found it a bit surprising to
have such requirement for editing a wiki.  Do you know the rationale of
this?

I also then wondered about that. But I guess Sharan can explain that.


You can find details of how to do it on our contributors page:

https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Contributors

I will send my ICLA to  soon.

Do you need some kind of notification when this is done?

[1] https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

Actually no, we (PMC in private ML) receive this information by the secretary

Jacques


Thanks.





Re: How to resolve CSRF attack

2018-04-17 Thread Jacques Le Roux

Hi Paul,

I tried hard to use it 9 months ago but did not succeed.

I even then inadvertently committed my then WIP work and then removed it at 
http://svn.apache.org/viewvc?view=revision&revision=1799243

I also tried the Tomcat RestCsrfPreventionFilter see my comment in OFBIZ-6766 
at https://s.apache.org/ndCd

--

BTW (loosely related) when I worked on Ajax+JWT+CORS (OFBIZ-10307) I tried to use the Tomcat CORS Filter 
 but finally gave up.


It's maybe possible to use these filters the right way.

But like I did for securing cookies (OFBIZ-6655 https://s.apache.org/4bnJ http://svn.apache.org/viewvc?view=revision&revision=1809687) I prefer to 
handle it in our code and not depends on Tomcat for that.


YMMV

Sorry for he plain links in text, I have no time to play with [#] link stuff :)

Jacques


Le 17/04/2018 à 02:53, Paul Foxworthy a écrit :

Hi Michael,

I would say it is a vulnerability. OFBiz could make this distinction if we
add a hidden field to each form with a unique hash, and verify the hash is
correct when processing a POST. A spoofed form wouldn't have the right hash.

We are already using some of the OWASP (Open Web Application Security
Project, owasp.org) classes. They also have a library for CSRF prevention:
https://www.owasp.org/index.php/Category:OWASP_CSRFGuard_Project . Would
this be useful?

Cheers

Paul Foxworthy

On 16 April 2018 at 19:22, Michael Brohl  wrote:


Hi Sonali,

this is not a vulnerability.

You are logged in and posting a request from the same browser with the
same session. There is no chance for OFBiz to make a distiction between a
request initiated from an OFBiz generated page or any other page (like your
webmail) from the same browser/session.

Regards,

Michael


Am 16.04.18 um 06:08 schrieb Sonali Agrahari:

Hello all,

I am using OFBiz 12.04 version in my application.
When logged in to the application as admin user and open web mail in
another browser , suppose we received a mail  which have link
http://xyz.com/activate.html .
The links points to html file as :


   


https://localhost:8443/catalog/control/CreateProductCategory"; name =
"f1"
id = "f1" method = "post">
   






The user clicks on this link while he has logged on to the application. As
the crafted form is doing a post request in a valid session, the requested
post gets executed and result will be displayed i.e. all values will be
inserted in database properly.
And the link gets opened in other tab of same browser.

How can resolve this type of vulnerability.
Kindly help.


Thanks & regards
Sonali









--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html










Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Mathieu Lirzin
Hello Sharan,

Sharan Foga  writes:

> I couldn't find your name in the list of people who have an
> ICLA. Please can you complete one. We ask all contributors to complete
> one before we give access to our wiki.

Indeed I was unaware of this requirement.  Maybe the wording in [1]
should be changed to make it clear that signing an ICLA is a
requirement.  Additionally it would be nice it was giving some
information regarding the license upon which wiki contributions are
made.

While I have no problem signing an ICLA, I found it a bit surprising to
have such requirement for editing a wiki.  Do you know the rationale of
this?

> You can find details of how to do it on our contributors page:
>
> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Contributors

I will send my ICLA to  soon.

Do you need some kind of notification when this is done?

[1] https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

Thanks.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37


Re: help with updateProductPrice

2018-04-17 Thread Rajesh Mallah
Further Info:

  
fromDate

  

   

In XML results in

from_date   | 2018-04-17 14:59:34.001+05:30

in DB. looks like the parser is kind enough to consider TZ
spec without colons.


regds
mallah.


On Tue, Apr 17, 2018 at 2:42 PM, Rajesh Mallah 
wrote:

>
> Its PostgreSQL
> regds
>
>
>  below is a sample data :
>
> SQL> select * from  ofbiz.product_price  where
> product_id='PROD_SW52D5H3EN' order by created_date desc limit 1;
>
> -[ RECORD 1 ]---+--
> product_id  | PROD_SW52D5H3EN
> product_price_type_id   | DEFAULT_PRICE
> product_price_purpose_id| PURCHASE
> currency_uom_id | INR
> product_store_group_id  | _NA_
> from_date   | 2018-04-17 12:49:20+05:30< This has
> been put by me.
> thru_date   |
> price   | 121.000
> term_uom_id | WT_kg
> custom_price_calc_service   |
> price_without_tax   |
> price_with_tax  |
> tax_amount  |
> tax_percentage  |
> tax_auth_party_id   |
> tax_auth_geo_id |
> tax_in_price| Y
> created_date| 2018-04-17 12:49:20.416+05:30
> created_by_user_login   | admin
> last_modified_date  | 2018-04-17 12:49:20.416+05:30
> last_modified_by_user_login | admin
> last_updated_stamp  | 2018-04-17 12:49:20.416+05:30  <
> Generated by defaults.
> last_updated_tx_stamp   | 2018-04-17 12:49:20.357+05:30
> created_stamp   | 2018-04-17 12:49:20.416+05:30
> created_tx_stamp| 2018-04-17 12:49:20.357+05:30
>
>
> On Tue, Apr 17, 2018 at 2:39 PM, Deepak Dixit  com> wrote:
>
>> Hi Rajesh,
>>
>> Could you please share which database you are using?
>>
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwax.co
>>
>> On Tue, Apr 17, 2018 at 2:36 PM, Rajesh Mallah 
>> wrote:
>>
>> >  Hi ,
>> >
>> >
>> > it was in conversion/DateTimeConverters.java that was appending '.0' to
>> > the
>> > end of
>> > string if the string did not contain any  decimals. So i have now
>> started
>> > sending
>> > the fractional seconds. And things are better (if not perfect).
>> >
>> >
>> >
>> > public java.sql.Timestamp convert(String obj, Locale locale, TimeZone
>> > timeZone, String formatString) throws ConversionException {
>> > String str = obj.trim();
>> > if (str.length() == 0) {
>> > return null;
>> > }
>> > DateFormat df = null;
>> > if (UtilValidate.isEmpty(formatString)) {
>> > // These hacks are a bad idea, but they are included
>> > // for backward compatibility.
>> > if (str.length() > 0 && !str.contains(":")) {
>> > str = str + " 00:00:00.00";
>> > }
>> > // hack to mimic Timestamp.valueOf() method
>> > if (str.length() > 0 && !str.contains(".")) {
>> > str = str + ".0";
>> > } else {
>> > // DateFormat has a funny way of parsing
>> milliseconds:
>> > // 00:00:00.2 parses to 00:00:00.002
>> > // so we'll add zeros to the end to get 00:00:00.200
>> > String[] timeSplit = str.split("[.]");
>> > if (timeSplit.length > 1 && timeSplit[1].length() <
>> 3)
>> > {
>> > str = str + "000".substring(timeSplit[1].
>> > length());
>> > }
>> > }
>> > df =
>> > UtilDateTime.toDateTimeFormat(UtilDateTime.getDateTimeFormat(),
>> timeZone,
>> > locale);
>> > } else {
>> > df = UtilDateTime.toDateTimeFormat(formatString,
>> timeZone,
>> > locale);
>> > }
>> > try {
>> > return new java.sql.Timestamp(df.parse(str).getTime());
>> > } catch (ParseException e) {
>> >
>> >
>> > On Tue, Apr 17, 2018 at 2:19 PM, Rajesh Mallah > >
>> > wrote:
>> >
>> > > Thanks Rishi.
>> > >
>> > > On Tue, Apr 17, 2018 at 2:08 PM, Rishi Solanki <
>> rishisolan...@gmail.com>
>> > > wrote:
>> > >
>> > >> UtilDateTime is the utility class, add the time format support you
>> want
>> > >> and
>> > >> use it. Most format supported by this utility class OFBiz have.
>> > >>
>> > >> Rishi Solanki
>> > >> Sr Manager, Enterprise Software Development
>> > >> HotWax Systems Pvt. Ltd.
>> > >> Direct: +91-9893287847
>> > >> http://www.hotwaxsystems.com
>> > >> www.hotwax.co
>> > >>
>> > >> On Tue, Apr 17, 2018 at 12:27 PM, Rajesh Mallah <
>> > mallah.raj...@gmail.com>
>> > >> wrote:
>> > >>
>> > >> > Now I am passing  "2018-04-17 12:09:17+05:30" as fromDate ,
>> > >> > Which is the value picked up from the DB column.
>> > >> >
>> > >> > Even at XML level the string is preserved , but at some stage after
>> > >> > hitting tomc

Re: How to resolve CSRF attack

2018-04-17 Thread Jacques Le Roux

It means that the person sends a message to the ML w/o being subscribed to it. 
So we (moderators) have to allow this message to pass.

Jacques


Le 17/04/2018 à 04:49, Chris Clark a écrit :

What does yoyr message has been moderated mean?

On Mon, Apr 16, 2018, 3:00 AM Sonali Agrahari, 
wrote:


Hello all,

   I am using OFBiz 12.04 version in my application.
   When logged in to the application as admin user and open web mail in
another browser , suppose we received a mail  which have link
http://xyz.com/activate.html .
The links points to html file as :


  



   https://localhost:8443/catalog/control/CreateProductCategory"; name = "f1"
id = "f1" method = "post">
  
   
   




The user clicks on this link while he has logged on to the application. As
the crafted form is doing a post request in a valid session, the requested
post gets executed and result will be displayed i.e. all values will be
inserted in database properly.
And the link gets opened in other tab of same browser.

How can resolve this type of vulnerability.
Kindly help.


Thanks & regards
Sonali









--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html





Re: help with updateProductPrice

2018-04-17 Thread Rajesh Mallah
Its PostgreSQL
regds


 below is a sample data :

SQL> select * from  ofbiz.product_price  where product_id='PROD_SW52D5H3EN'
order by created_date desc limit 1;

-[ RECORD 1 ]---+--
product_id  | PROD_SW52D5H3EN
product_price_type_id   | DEFAULT_PRICE
product_price_purpose_id| PURCHASE
currency_uom_id | INR
product_store_group_id  | _NA_
from_date   | 2018-04-17 12:49:20+05:30< This has
been put by me.
thru_date   |
price   | 121.000
term_uom_id | WT_kg
custom_price_calc_service   |
price_without_tax   |
price_with_tax  |
tax_amount  |
tax_percentage  |
tax_auth_party_id   |
tax_auth_geo_id |
tax_in_price| Y
created_date| 2018-04-17 12:49:20.416+05:30
created_by_user_login   | admin
last_modified_date  | 2018-04-17 12:49:20.416+05:30
last_modified_by_user_login | admin
last_updated_stamp  | 2018-04-17 12:49:20.416+05:30  <
Generated by defaults.
last_updated_tx_stamp   | 2018-04-17 12:49:20.357+05:30
created_stamp   | 2018-04-17 12:49:20.416+05:30
created_tx_stamp| 2018-04-17 12:49:20.357+05:30


On Tue, Apr 17, 2018 at 2:39 PM, Deepak Dixit <
deepak.di...@hotwaxsystems.com> wrote:

> Hi Rajesh,
>
> Could you please share which database you are using?
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwax.co
>
> On Tue, Apr 17, 2018 at 2:36 PM, Rajesh Mallah 
> wrote:
>
> >  Hi ,
> >
> >
> > it was in conversion/DateTimeConverters.java that was appending '.0' to
> > the
> > end of
> > string if the string did not contain any  decimals. So i have now started
> > sending
> > the fractional seconds. And things are better (if not perfect).
> >
> >
> >
> > public java.sql.Timestamp convert(String obj, Locale locale, TimeZone
> > timeZone, String formatString) throws ConversionException {
> > String str = obj.trim();
> > if (str.length() == 0) {
> > return null;
> > }
> > DateFormat df = null;
> > if (UtilValidate.isEmpty(formatString)) {
> > // These hacks are a bad idea, but they are included
> > // for backward compatibility.
> > if (str.length() > 0 && !str.contains(":")) {
> > str = str + " 00:00:00.00";
> > }
> > // hack to mimic Timestamp.valueOf() method
> > if (str.length() > 0 && !str.contains(".")) {
> > str = str + ".0";
> > } else {
> > // DateFormat has a funny way of parsing
> milliseconds:
> > // 00:00:00.2 parses to 00:00:00.002
> > // so we'll add zeros to the end to get 00:00:00.200
> > String[] timeSplit = str.split("[.]");
> > if (timeSplit.length > 1 && timeSplit[1].length() <
> 3)
> > {
> > str = str + "000".substring(timeSplit[1].
> > length());
> > }
> > }
> > df =
> > UtilDateTime.toDateTimeFormat(UtilDateTime.getDateTimeFormat(),
> timeZone,
> > locale);
> > } else {
> > df = UtilDateTime.toDateTimeFormat(formatString,
> timeZone,
> > locale);
> > }
> > try {
> > return new java.sql.Timestamp(df.parse(str).getTime());
> > } catch (ParseException e) {
> >
> >
> > On Tue, Apr 17, 2018 at 2:19 PM, Rajesh Mallah 
> > wrote:
> >
> > > Thanks Rishi.
> > >
> > > On Tue, Apr 17, 2018 at 2:08 PM, Rishi Solanki <
> rishisolan...@gmail.com>
> > > wrote:
> > >
> > >> UtilDateTime is the utility class, add the time format support you
> want
> > >> and
> > >> use it. Most format supported by this utility class OFBiz have.
> > >>
> > >> Rishi Solanki
> > >> Sr Manager, Enterprise Software Development
> > >> HotWax Systems Pvt. Ltd.
> > >> Direct: +91-9893287847
> > >> http://www.hotwaxsystems.com
> > >> www.hotwax.co
> > >>
> > >> On Tue, Apr 17, 2018 at 12:27 PM, Rajesh Mallah <
> > mallah.raj...@gmail.com>
> > >> wrote:
> > >>
> > >> > Now I am passing  "2018-04-17 12:09:17+05:30" as fromDate ,
> > >> > Which is the value picked up from the DB column.
> > >> >
> > >> > Even at XML level the string is preserved , but at some stage after
> > >> > hitting tomcat it becomes: "2018-04-17 12:09:17+05:30.0"
> > >> >
> > >> > which is not parseable.
> > >> >
> > >> >  |W| [ModelService.makeValid] : Type conversion of field [fromDate]
> to
> > >> type
> > >> > [java.sql.Timestamp] failed f
> > >> > or value "2018-04-17 12:09:17+05:30":
> > >> > org.apache.ofbiz.base.util.GeneralException:
> > java.text.ParseException:
> > >> > Unparseable date: "2018-04-17 12:09:17+05:30.0"
> > (java.text.ParseExceptio
> > >> > n: Unparseable da

Re: help with updateProductPrice

2018-04-17 Thread Deepak Dixit
Hi Rajesh,

Could you please share which database you are using?


Thanks & Regards
--
Deepak Dixit
www.hotwax.co

On Tue, Apr 17, 2018 at 2:36 PM, Rajesh Mallah 
wrote:

>  Hi ,
>
>
> it was in conversion/DateTimeConverters.java that was appending '.0' to
> the
> end of
> string if the string did not contain any  decimals. So i have now started
> sending
> the fractional seconds. And things are better (if not perfect).
>
>
>
> public java.sql.Timestamp convert(String obj, Locale locale, TimeZone
> timeZone, String formatString) throws ConversionException {
> String str = obj.trim();
> if (str.length() == 0) {
> return null;
> }
> DateFormat df = null;
> if (UtilValidate.isEmpty(formatString)) {
> // These hacks are a bad idea, but they are included
> // for backward compatibility.
> if (str.length() > 0 && !str.contains(":")) {
> str = str + " 00:00:00.00";
> }
> // hack to mimic Timestamp.valueOf() method
> if (str.length() > 0 && !str.contains(".")) {
> str = str + ".0";
> } else {
> // DateFormat has a funny way of parsing milliseconds:
> // 00:00:00.2 parses to 00:00:00.002
> // so we'll add zeros to the end to get 00:00:00.200
> String[] timeSplit = str.split("[.]");
> if (timeSplit.length > 1 && timeSplit[1].length() < 3)
> {
> str = str + "000".substring(timeSplit[1].
> length());
> }
> }
> df =
> UtilDateTime.toDateTimeFormat(UtilDateTime.getDateTimeFormat(), timeZone,
> locale);
> } else {
> df = UtilDateTime.toDateTimeFormat(formatString, timeZone,
> locale);
> }
> try {
> return new java.sql.Timestamp(df.parse(str).getTime());
> } catch (ParseException e) {
>
>
> On Tue, Apr 17, 2018 at 2:19 PM, Rajesh Mallah 
> wrote:
>
> > Thanks Rishi.
> >
> > On Tue, Apr 17, 2018 at 2:08 PM, Rishi Solanki 
> > wrote:
> >
> >> UtilDateTime is the utility class, add the time format support you want
> >> and
> >> use it. Most format supported by this utility class OFBiz have.
> >>
> >> Rishi Solanki
> >> Sr Manager, Enterprise Software Development
> >> HotWax Systems Pvt. Ltd.
> >> Direct: +91-9893287847
> >> http://www.hotwaxsystems.com
> >> www.hotwax.co
> >>
> >> On Tue, Apr 17, 2018 at 12:27 PM, Rajesh Mallah <
> mallah.raj...@gmail.com>
> >> wrote:
> >>
> >> > Now I am passing  "2018-04-17 12:09:17+05:30" as fromDate ,
> >> > Which is the value picked up from the DB column.
> >> >
> >> > Even at XML level the string is preserved , but at some stage after
> >> > hitting tomcat it becomes: "2018-04-17 12:09:17+05:30.0"
> >> >
> >> > which is not parseable.
> >> >
> >> >  |W| [ModelService.makeValid] : Type conversion of field [fromDate] to
> >> type
> >> > [java.sql.Timestamp] failed f
> >> > or value "2018-04-17 12:09:17+05:30":
> >> > org.apache.ofbiz.base.util.GeneralException:
> java.text.ParseException:
> >> > Unparseable date: "2018-04-17 12:09:17+05:30.0"
> (java.text.ParseExceptio
> >> > n: Unparseable date: "2018-04-17 12:09:17+05:30.0")
> >> >
> >> >
> >> > 
> >> >
> >> >   
> >> > fromDate
> >> > 
> >> >   
> >> > 
> >> >   
> >> >
> >> > 
> >> >
> >> >
> >> >
> >> >
> >> > regds
> >> > mallah.
> >> >
> >> >
> >> > On Tue, Apr 17, 2018 at 11:08 AM, Rajesh Mallah <
> >> mallah.raj...@gmail.com>
> >> > wrote:
> >> >
> >> > > Hello Mr Deepak ,
> >> > >
> >> > > Thanks for the response . The record does exists but i guess
> >> > > i am not specifying the params good enough to hit the record
> >> > > by pkey.
> >> > >
> >> > > I wish there were a "product_price_id" in ProductPrice entity. :-)
> >> > >
> >> > > regds
> >> > > mallah.
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > On Tue, Apr 17, 2018 at 9:58 AM, Deepak Dixit <
> deepak.di...@hotwax.co
> >> >
> >> > > wrote:
> >> > >
> >> > >> Hi Rajesh,
> >> > >>
> >> > >> If you want to create product price you should use
> createProductPrice
> >> > >> service,
> >> > >> https://demo-stable.ofbiz.apache.org/webtools/control/Servic
> >> > >> eList?sel_service_name=createProductPrice
> >> > >>
> >> > >> If productPrice record already exists you should use
> >> updateProductPrice,
> >> > >>
> >> > >> Thanks & Regards
> >> > >> --
> >> > >> Deepak Dixit
> >> > >> Director of Product Engineering
> >> > >> HotWax Commerce 
> >> > >>
> >> > >> On Mon, Apr 16, 2018 at 11:42 PM, Rajesh Mallah <
> >> > mallah.raj...@gmail.com>
> >> > >> wrote:
> >> > >>
> >> > >> > Hi ,
> >> > >> >
> >> > >> > I am calling
> >> > >> >
> >> > >> > https://demo-stable.ofbiz.apache.org/webtools/control/
> >> > >> > S

Re: help with updateProductPrice

2018-04-17 Thread Rajesh Mallah
 Hi ,


it was in conversion/DateTimeConverters.java that was appending '.0' to the
end of
string if the string did not contain any  decimals. So i have now started
sending
the fractional seconds. And things are better (if not perfect).



public java.sql.Timestamp convert(String obj, Locale locale, TimeZone
timeZone, String formatString) throws ConversionException {
String str = obj.trim();
if (str.length() == 0) {
return null;
}
DateFormat df = null;
if (UtilValidate.isEmpty(formatString)) {
// These hacks are a bad idea, but they are included
// for backward compatibility.
if (str.length() > 0 && !str.contains(":")) {
str = str + " 00:00:00.00";
}
// hack to mimic Timestamp.valueOf() method
if (str.length() > 0 && !str.contains(".")) {
str = str + ".0";
} else {
// DateFormat has a funny way of parsing milliseconds:
// 00:00:00.2 parses to 00:00:00.002
// so we'll add zeros to the end to get 00:00:00.200
String[] timeSplit = str.split("[.]");
if (timeSplit.length > 1 && timeSplit[1].length() < 3) {
str = str + "000".substring(timeSplit[1].length());
}
}
df =
UtilDateTime.toDateTimeFormat(UtilDateTime.getDateTimeFormat(), timeZone,
locale);
} else {
df = UtilDateTime.toDateTimeFormat(formatString, timeZone,
locale);
}
try {
return new java.sql.Timestamp(df.parse(str).getTime());
} catch (ParseException e) {


On Tue, Apr 17, 2018 at 2:19 PM, Rajesh Mallah 
wrote:

> Thanks Rishi.
>
> On Tue, Apr 17, 2018 at 2:08 PM, Rishi Solanki 
> wrote:
>
>> UtilDateTime is the utility class, add the time format support you want
>> and
>> use it. Most format supported by this utility class OFBiz have.
>>
>> Rishi Solanki
>> Sr Manager, Enterprise Software Development
>> HotWax Systems Pvt. Ltd.
>> Direct: +91-9893287847
>> http://www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Tue, Apr 17, 2018 at 12:27 PM, Rajesh Mallah 
>> wrote:
>>
>> > Now I am passing  "2018-04-17 12:09:17+05:30" as fromDate ,
>> > Which is the value picked up from the DB column.
>> >
>> > Even at XML level the string is preserved , but at some stage after
>> > hitting tomcat it becomes: "2018-04-17 12:09:17+05:30.0"
>> >
>> > which is not parseable.
>> >
>> >  |W| [ModelService.makeValid] : Type conversion of field [fromDate] to
>> type
>> > [java.sql.Timestamp] failed f
>> > or value "2018-04-17 12:09:17+05:30":
>> > org.apache.ofbiz.base.util.GeneralException: java.text.ParseException:
>> > Unparseable date: "2018-04-17 12:09:17+05:30.0" (java.text.ParseExceptio
>> > n: Unparseable date: "2018-04-17 12:09:17+05:30.0")
>> >
>> >
>> > 
>> >
>> >   
>> > fromDate
>> > 
>> >   
>> > 
>> >   
>> >
>> > 
>> >
>> >
>> >
>> >
>> > regds
>> > mallah.
>> >
>> >
>> > On Tue, Apr 17, 2018 at 11:08 AM, Rajesh Mallah <
>> mallah.raj...@gmail.com>
>> > wrote:
>> >
>> > > Hello Mr Deepak ,
>> > >
>> > > Thanks for the response . The record does exists but i guess
>> > > i am not specifying the params good enough to hit the record
>> > > by pkey.
>> > >
>> > > I wish there were a "product_price_id" in ProductPrice entity. :-)
>> > >
>> > > regds
>> > > mallah.
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Tue, Apr 17, 2018 at 9:58 AM, Deepak Dixit > >
>> > > wrote:
>> > >
>> > >> Hi Rajesh,
>> > >>
>> > >> If you want to create product price you should use createProductPrice
>> > >> service,
>> > >> https://demo-stable.ofbiz.apache.org/webtools/control/Servic
>> > >> eList?sel_service_name=createProductPrice
>> > >>
>> > >> If productPrice record already exists you should use
>> updateProductPrice,
>> > >>
>> > >> Thanks & Regards
>> > >> --
>> > >> Deepak Dixit
>> > >> Director of Product Engineering
>> > >> HotWax Commerce 
>> > >>
>> > >> On Mon, Apr 16, 2018 at 11:42 PM, Rajesh Mallah <
>> > mallah.raj...@gmail.com>
>> > >> wrote:
>> > >>
>> > >> > Hi ,
>> > >> >
>> > >> > I am calling
>> > >> >
>> > >> > https://demo-stable.ofbiz.apache.org/webtools/control/
>> > >> > ServiceList?sel_service_name=updateProductPrice
>> > >> >
>> > >> > with ARGS
>> > >> >
>> > >> > {
>> > >> > currencyUomId   "INR",
>> > >> > fromDate"2018-04-16 17:39:52",
>> > >> > price   150,
>> > >> > productId   "PROD_SW52D5H3EN",
>> > >> > productPricePurposeId   "PURCHASE",
>> > >> > productPriceTypeId  "DEFAULT_PRICE",
>> > >> > productStoreGroupId "_NA_",
>> > >> > taxInPrice  "Y",
>> > >> > termUomId   "WT

Re: help with updateProductPrice

2018-04-17 Thread Rajesh Mallah
Thanks Rishi.

On Tue, Apr 17, 2018 at 2:08 PM, Rishi Solanki 
wrote:

> UtilDateTime is the utility class, add the time format support you want and
> use it. Most format supported by this utility class OFBiz have.
>
> Rishi Solanki
> Sr Manager, Enterprise Software Development
> HotWax Systems Pvt. Ltd.
> Direct: +91-9893287847
> http://www.hotwaxsystems.com
> www.hotwax.co
>
> On Tue, Apr 17, 2018 at 12:27 PM, Rajesh Mallah 
> wrote:
>
> > Now I am passing  "2018-04-17 12:09:17+05:30" as fromDate ,
> > Which is the value picked up from the DB column.
> >
> > Even at XML level the string is preserved , but at some stage after
> > hitting tomcat it becomes: "2018-04-17 12:09:17+05:30.0"
> >
> > which is not parseable.
> >
> >  |W| [ModelService.makeValid] : Type conversion of field [fromDate] to
> type
> > [java.sql.Timestamp] failed f
> > or value "2018-04-17 12:09:17+05:30":
> > org.apache.ofbiz.base.util.GeneralException: java.text.ParseException:
> > Unparseable date: "2018-04-17 12:09:17+05:30.0" (java.text.ParseExceptio
> > n: Unparseable date: "2018-04-17 12:09:17+05:30.0")
> >
> >
> > 
> >
> >   
> > fromDate
> > 
> >   
> > 
> >   
> >
> > 
> >
> >
> >
> >
> > regds
> > mallah.
> >
> >
> > On Tue, Apr 17, 2018 at 11:08 AM, Rajesh Mallah  >
> > wrote:
> >
> > > Hello Mr Deepak ,
> > >
> > > Thanks for the response . The record does exists but i guess
> > > i am not specifying the params good enough to hit the record
> > > by pkey.
> > >
> > > I wish there were a "product_price_id" in ProductPrice entity. :-)
> > >
> > > regds
> > > mallah.
> > >
> > >
> > >
> > >
> > >
> > > On Tue, Apr 17, 2018 at 9:58 AM, Deepak Dixit 
> > > wrote:
> > >
> > >> Hi Rajesh,
> > >>
> > >> If you want to create product price you should use createProductPrice
> > >> service,
> > >> https://demo-stable.ofbiz.apache.org/webtools/control/Servic
> > >> eList?sel_service_name=createProductPrice
> > >>
> > >> If productPrice record already exists you should use
> updateProductPrice,
> > >>
> > >> Thanks & Regards
> > >> --
> > >> Deepak Dixit
> > >> Director of Product Engineering
> > >> HotWax Commerce 
> > >>
> > >> On Mon, Apr 16, 2018 at 11:42 PM, Rajesh Mallah <
> > mallah.raj...@gmail.com>
> > >> wrote:
> > >>
> > >> > Hi ,
> > >> >
> > >> > I am calling
> > >> >
> > >> > https://demo-stable.ofbiz.apache.org/webtools/control/
> > >> > ServiceList?sel_service_name=updateProductPrice
> > >> >
> > >> > with ARGS
> > >> >
> > >> > {
> > >> > currencyUomId   "INR",
> > >> > fromDate"2018-04-16 17:39:52",
> > >> > price   150,
> > >> > productId   "PROD_SW52D5H3EN",
> > >> > productPricePurposeId   "PURCHASE",
> > >> > productPriceTypeId  "DEFAULT_PRICE",
> > >> > productStoreGroupId "_NA_",
> > >> > taxInPrice  "Y",
> > >> > termUomId   "WT_kg"
> > >> > }
> > >> >
> > >> >
> > >> > I am getting error:
> > >> >
> > >> >
> > >> > faultString:Error running the simple-method: Entity value not found
> > with
> > >> > name: lookedUpValue Method = updateProductPrice, File =
> > >> > file:/opt/ofbiz/apache-ofbiz-16.11.04/applications/product/
> > >> > minilang/product/price/PriceServices.xml,
> > >> > Element = , Line 69null
> > >> >
> > >> >
> > >> > the minilang def is reproduced here for convinience:
> > >> >
> > >> >   > >> short-description="Update
> > >> > an ProductPrice">
> > >> > 
> > >> > 
> > >> >  > >> > xml-resource="component://product/minilang/product/
> > >> > product/ProductServices.xml"/>
> > >> > 
> > >> >  > >> > property="ProductPriceMaintPermissionError"/>
> > >> > 
> > >> > 
> > >> >
> > >> > 
> > >> >
> > >> >  > >> > value-field="lookedUpValue"/>
> > >> >
> > >> > 
> > >> >  > >> > result-name="oldPrice"/>
> > >> >
> > >> >  > value-field="lookedUpValue"/>
> > >> >
> > >> > 
> > >> >  > >> > from-field="nowTimestamp"/>
> > >> >  > >> > from-field="userLogin.userLoginId"/>
> > >> >
> > >> > 
> > >> >  
> > >> >
> > >> > The productID does exists in Entity ProductPrice
> > >> > Where am I going wrong ?
> > >> >
> > >> > thanks & regds
> > >> > Rajesh Mallah.
> > >> >
> > >>
> > >
> > >
> >
>


Re: Price Rule Engine

2018-04-17 Thread Rishi Solanki
+1 it will work for sure.

Thank you Scott for the trick, loving it. Thanks again!

Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Tue, Apr 17, 2018 at 11:45 AM, Scott Gray 
wrote:

> Have you tried setting the list price to zero?  Alternatively, if you want
> to maintain a value in list price then use two price rule actions:
> 1. Percentage of list price: -100
> 2. Percentage of average cost: 130
>
> That should set the first modifier to effectively zero the starting price,
> and then can add your average cost modifier.
>
> Regards
> Scott
>
> On 17 April 2018 at 03:03,  wrote:
>
> > I am sure there has to be a way to genrerate a price rule without always
> > adding and subtracting to or from List Price.
> >
> > What if I wanted to at cost plus?  Or wholesale minus? Or a discount
> > against the gross margin?
> >
> > Or what if I wanted to sell at the default price list or just sell at
> > the Wholesale price list?
> >
> >  Original Message 
> > Subject: Re: Price Rule Engine
> > From: Rishi Solanki 
> > Date: Fri, April 06, 2018 1:43 am
> > To: ofbizuser 
> >
> > Please go thru the calculateProductPrice service it will have all
> > information.
> >
> > Rishi Solanki
> > Sr Manager, Enterprise Software Development
> > HotWax Systems Pvt. Ltd.
> > Direct: +91-9893287847
> > http://www.hotwaxsystems.com
> > www.hotwax.co
> >
> > On Thu, Apr 5, 2018 at 10:33 PM,  wrote:
> >
> > > Thanks Rishi. I think we will need to customize it to give a few new
> > > actions that are purely based off of costs. Do you know what entity we
> > > would need to look to customize? I am thinking we would need to
> > > duplicate every action that is there but have it add to the Average
> > > Costs and Not List
> > >
> > > On a side note... Is it possible to create pricing based on the
> > > warehouse that the product is shipping out of?
> > >
> > >  Original Message 
> > > Subject: Re: Price Rule Engine
> > > From: Rishi Solanki 
> > > Date: Thu, April 05, 2018 6:06 am
> > > To: ofbizuser 
> > >
> > > Aha, sorry I forgot this while giving the solution. OOTB it is not
> > > possible, but a trick of matching the average cost and list price would
> > > work.
> > > 100 is the avg cost and same list price (ECA rule to match them
> always).
> > > Adding rule on avg cost will always sale the product on the price you
> > > want.
> > >
> > > As mentioned OOTB not supported, you may like to customize it, as
> > > required.
> > >
> > > Rishi Solanki
> > > Sr Manager, Enterprise Software Development
> > > HotWax Systems Pvt. Ltd.
> > > Direct: +91-9893287847
> > > http://www.hotwaxsystems.com
> > > www.hotwax.co
> > >
> > > On Thu, Apr 5, 2018 at 6:26 PM,  wrote:
> > >
> > > > In case product's average cost change then you can create a price
> rule
> > > > action such that Percent Of Average Cost (PRICE_POAC) to 130 percent.
> > > > Then
> > > > system will always sale the product on that rule.
> > > >
> > > > The issue with the price rule you mentioned is that the system would
> > add
> > > > 130 percent of costs to the list price. I want just the 130 Percent
> of
> > > > Average Costs without adding that to the list price. Is that
> possible?
> > > >
> > > >  Original Message 
> > > > Subject: Re: Price Rule Engine
> > > > From: Rishi Solanki 
> > > > Date: Thu, April 05, 2018 5:10 am
> > > > To: ofbizuser 
> > > >
> > > > James,
> > > >
> > > > If you wanted to set list price as 30% of average cost, then there is
> > no
> > > > direct mechanism. You may need to set the average price for product
> and
> > > > service to do that.
> > > > In case product's average cost change then you can create a price
> rule
> > > > action such that Percent Of Average Cost (PRICE_POAC) to 130 percent.
> > > > Then
> > > > system will always sale the product on that rule.
> > > > Please refer: Catalog >> Price Rules >> Edit Price Rules >> Action
> Type
> > > > Section.
> > > >
> > > > Current Ecommerce Portal and price engine expect list price always.
> So
> > > > setting list price and adding rule on Average Cost works for you, if
> > I'm
> > > > getting your problem correctly.
> > > >
> > > > HTH!
> > > >
> > > >
> > > > Rishi Solanki
> > > > Sr Manager, Enterprise Software Development
> > > > HotWax Systems Pvt. Ltd.
> > > > Direct: +91-9893287847
> > > > http://www.hotwaxsystems.com
> > > > www.hotwax.co
> > > >
> > > > On Thu, Apr 5, 2018 at 5:12 PM,  wrote:
> > > >
> > > > > The issue with the pricing engine is that the system is always
> trying
> > > to
> > > > > add to List Price so once it figures out the margin it will add it
> to
> > > > > the list price. Most customers base a price off of something other
> > than
> > > > > list price. Is there a way to calculate Costs +$7 or 1.3 * Costs?
> > > > >  Original Message 
> > > > > Subject: Re: Price Rule Engine
> > > > > From: Arthur

Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Sharan Foga
Hi Mathieu

I couldn't find your name in the list of people who have an ICLA. Please can 
you complete one. We ask all contributors to complete one before we give access 
to our wiki. 

You can find details of how to do it on our contributors page:

https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Contributors

Thanks
Sharan

On 2018/04/17 07:33:11, Mathieu Lirzin  wrote: 
> Hello,
> 
> Deepak Dixit  writes:
> 
> > Your email has been moderated, please subscribe mailing list 
> > http://ofbiz.apache.org/mailing-lists.html
> 
> Done.
> 
> Thanks.
> 
> -- 
> Mathieu Lirzin
> GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37
> 


Re: help with updateProductPrice

2018-04-17 Thread Rishi Solanki
UtilDateTime is the utility class, add the time format support you want and
use it. Most format supported by this utility class OFBiz have.

Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Tue, Apr 17, 2018 at 12:27 PM, Rajesh Mallah 
wrote:

> Now I am passing  "2018-04-17 12:09:17+05:30" as fromDate ,
> Which is the value picked up from the DB column.
>
> Even at XML level the string is preserved , but at some stage after
> hitting tomcat it becomes: "2018-04-17 12:09:17+05:30.0"
>
> which is not parseable.
>
>  |W| [ModelService.makeValid] : Type conversion of field [fromDate] to type
> [java.sql.Timestamp] failed f
> or value "2018-04-17 12:09:17+05:30":
> org.apache.ofbiz.base.util.GeneralException: java.text.ParseException:
> Unparseable date: "2018-04-17 12:09:17+05:30.0" (java.text.ParseExceptio
> n: Unparseable date: "2018-04-17 12:09:17+05:30.0")
>
>
> 
>
>   
> fromDate
> 
>   
> 
>   
>
> 
>
>
>
>
> regds
> mallah.
>
>
> On Tue, Apr 17, 2018 at 11:08 AM, Rajesh Mallah 
> wrote:
>
> > Hello Mr Deepak ,
> >
> > Thanks for the response . The record does exists but i guess
> > i am not specifying the params good enough to hit the record
> > by pkey.
> >
> > I wish there were a "product_price_id" in ProductPrice entity. :-)
> >
> > regds
> > mallah.
> >
> >
> >
> >
> >
> > On Tue, Apr 17, 2018 at 9:58 AM, Deepak Dixit 
> > wrote:
> >
> >> Hi Rajesh,
> >>
> >> If you want to create product price you should use createProductPrice
> >> service,
> >> https://demo-stable.ofbiz.apache.org/webtools/control/Servic
> >> eList?sel_service_name=createProductPrice
> >>
> >> If productPrice record already exists you should use updateProductPrice,
> >>
> >> Thanks & Regards
> >> --
> >> Deepak Dixit
> >> Director of Product Engineering
> >> HotWax Commerce 
> >>
> >> On Mon, Apr 16, 2018 at 11:42 PM, Rajesh Mallah <
> mallah.raj...@gmail.com>
> >> wrote:
> >>
> >> > Hi ,
> >> >
> >> > I am calling
> >> >
> >> > https://demo-stable.ofbiz.apache.org/webtools/control/
> >> > ServiceList?sel_service_name=updateProductPrice
> >> >
> >> > with ARGS
> >> >
> >> > {
> >> > currencyUomId   "INR",
> >> > fromDate"2018-04-16 17:39:52",
> >> > price   150,
> >> > productId   "PROD_SW52D5H3EN",
> >> > productPricePurposeId   "PURCHASE",
> >> > productPriceTypeId  "DEFAULT_PRICE",
> >> > productStoreGroupId "_NA_",
> >> > taxInPrice  "Y",
> >> > termUomId   "WT_kg"
> >> > }
> >> >
> >> >
> >> > I am getting error:
> >> >
> >> >
> >> > faultString:Error running the simple-method: Entity value not found
> with
> >> > name: lookedUpValue Method = updateProductPrice, File =
> >> > file:/opt/ofbiz/apache-ofbiz-16.11.04/applications/product/
> >> > minilang/product/price/PriceServices.xml,
> >> > Element = , Line 69null
> >> >
> >> >
> >> > the minilang def is reproduced here for convinience:
> >> >
> >> >   >> short-description="Update
> >> > an ProductPrice">
> >> > 
> >> > 
> >> >  >> > xml-resource="component://product/minilang/product/
> >> > product/ProductServices.xml"/>
> >> > 
> >> >  >> > property="ProductPriceMaintPermissionError"/>
> >> > 
> >> > 
> >> >
> >> > 
> >> >
> >> >  >> > value-field="lookedUpValue"/>
> >> >
> >> > 
> >> >  >> > result-name="oldPrice"/>
> >> >
> >> >  value-field="lookedUpValue"/>
> >> >
> >> > 
> >> >  >> > from-field="nowTimestamp"/>
> >> >  >> > from-field="userLogin.userLoginId"/>
> >> >
> >> > 
> >> >  
> >> >
> >> > The productID does exists in Entity ProductPrice
> >> > Where am I going wrong ?
> >> >
> >> > thanks & regds
> >> > Rajesh Mallah.
> >> >
> >>
> >
> >
>


Re: [MODERATE EMAIL] Wiki edit request

2018-04-17 Thread Mathieu Lirzin
Hello,

Deepak Dixit  writes:

> Your email has been moderated, please subscribe mailing list 
> http://ofbiz.apache.org/mailing-lists.html

Done.

Thanks.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37