[OFBiz] Users - Billing Account limit - Help debugging simple-method script

Jacopo Cappellato tiz at sastau.it
Fri Jun 17 11:07:15 EDT 2005


Hi Ashish,

just try with the following trick:

<calculate field-name="tempBillingAcct.accountLimit" type="Double">
   <number value="600"/>
</calculate>

You'll not need to convert it (in the simple map processor).

However, in the attached patch you'll find some custom services I've 
written to quickly create a customer+roles+billing account and a 
supplier+roles+agreements... I hope this will help you!

Jacopo


PS: thanks for having contributed your work over the "available 
services" screen: it's an excellent tool!



===============================================================
Ashish Hareet wrote:
===============================================================
I'm trying to create a billing account for all customers created in our app.

To make the process simpler, a default billing account is setup at 
customer creation time
with a default limit.

The extract from my simple method xml is as below. Before this part, the 
customer is created
& the partyId is extracted as below. The problem is that the billing 
account is created
but the account limit is not set. Can somebody help me understand where 
I'm going wrong.


<field-to-field field-name="partyId" map-name="tempMap" 
to-map-name="tempBillingAcct"/>
<string-to-field string="BILL_TO_CUSTOMER" map-name="tempBillingAcct" 
field-name="roleTypeId"/>
<string-to-field string="Billing account for sales orders" 
map-name="tempBillingAcct" field-name="description"/>
<string-to-field string="600.00" map-name="tempBillingAcct" 
field-name="accountLimit"/>
<string-to-field string="USD" map-name="tempBillingAcct" 
field-name="accountCurrencyUomId"/>
<call-map-processor in-map-name="tempBillingAcct" 
out-map-name="billingAcct">
	<process field="partyId">
		<copy to-field="partyId"/>
	</process>
	<process field="roleTypeId">
		<copy to-field="roleTypeId"/>
	</process>
	<process field="description">
		<copy to-field="description"/>
	</process>
	<process field="accountLimit">
		<convert type="Double"/>
		<copy to-field="accountLimit"/>
	</process>
	<process field="accountCurrencyUomId">
		<copy to-field="accountCurrencyUomId"/>
	</process>
</call-map-processor>

<check-errors/>

<call-service service-name="createBillingAccount" 
in-map-name="billingAcct" >
	<result-to-field result-name="billingAccountId" map-name="tempMap"/>
	<default-message>Customer successfully created(billing) 
${tempMap.billingAccountId}</default-message>
</call-service>

Thanks
Ashish Hareet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PartyQuickServices.xml
Type: text/xml
Size: 6730 bytes
Desc: not available
Url : http://lists.ofbiz.org/pipermail/users/attachments/20050617/8082115e/PartyQuickServices.xml


More information about the Users mailing list