Difference between revisions of "Attribute Level Pricing"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Attribute Level Pricing=
+
==About==
 +
 
 +
Enable the system to calculate purchase price based on product's attributes, using rule defined in the system. It will be easier to modify/calculate new price.
 +
 
 +
Customized by [http://www.fmis.vn FMIS]
  
 
==Case Study==
 
==Case Study==
Line 6: Line 10:
 
Base Price: 10$
 
Base Price: 10$
  
===For Attribute TL1===
+
'''For Attribute TL1'''
  
 
If TL1="Good", bonus of 0.5$, otherwise, deduction of 0.3
 
If TL1="Good", bonus of 0.5$, otherwise, deduction of 0.3
  
===For Attribute TN1===
+
'''For Attribute TN1'''
  
 
0<TN1<1: Deduction of 0.1
 
0<TN1<1: Deduction of 0.1
Line 20: Line 24:
 
3<=TN1: bonus of 0.2
 
3<=TN1: bonus of 0.2
  
===For Attribute TN2===
+
'''For Attribute TN2'''
 +
 
 
TN2 <=3: No bonus/deduction
 
TN2 <=3: No bonus/deduction
  
Line 67: Line 72:
 
Since we calculate purchase price at the end of month, we have create a "Material Receipt Batch" windows, which covers all tabs from the original "Material Receipt" windows, with a process to create Vendor Invoice for all receipts within the batch windows.
 
Since we calculate purchase price at the end of month, we have create a "Material Receipt Batch" windows, which covers all tabs from the original "Material Receipt" windows, with a process to create Vendor Invoice for all receipts within the batch windows.
  
Material Receipt Batch
+
'''Material Receipt Batch'''
  
 
[[File:Batch.png]]
 
[[File:Batch.png]]
  
Material Receipt 1
+
'''Material Receipt 1'''
  
 
[[File:MRR1.png]]
 
[[File:MRR1.png]]
 +
 +
'''''We enter the 1st attribute set for our Test Product: AL1="Pass", AN1=0.2, AN2=2.9'''''
  
 
[[File:MRRL1.png]]
 
[[File:MRRL1.png]]
  
We enter the 1st attribute set for our Test Product: AL1="Pass", AN1=0.2, AN2=2.9
+
'''Material Receipt 2'''
 
+
Material Receipt 2
+
  
 
[[File:MRR2.png]]
 
[[File:MRR2.png]]
 +
 +
'''''We enter the 2nd attribute set for our Test Product: AL2="Good", AN1=3, AN2=3.1'''''
  
 
[[File:MRRL2.png]]
 
[[File:MRRL2.png]]
 
We enter the 2nd attribute set for our Test Product: AL2="Good", AN1=3, AN2=3.1
 
  
 
We can complete all Material Receipt as normal
 
We can complete all Material Receipt as normal
Line 97: Line 102:
 
===Check Price===
 
===Check Price===
  
Vendor Invoice Line 1 (2nd Receipt)
+
'''Vendor Invoice Line 1 (2nd Receipt)''', Price = 10.9 = 10 + 0.5 (TL1) + 0.2 (TN2) + 0.2 (TN2)
  
 
[[File:INVL1.png]]
 
[[File:INVL1.png]]
  
Price = 10.9 = 10 + 0.5 (TL1) + 0.2 (TN2) + 0.2 (TN2)
+
'''Vendor Invoice Line 2 (1st Receipt)''', Price = 9.8 = 10 - 0.3 (TL1) - 0.1 (TN1) - 0 (TN2)
 
+
Vendor Invoice Line 2 (1st Receipt)
+
  
 
[[File:INVL2.png]]
 
[[File:INVL2.png]]
 
Price = 9.8 = 10 - 0.3 (TL1) - 0.1 (TN1) - 0 (TN2)
 

Latest revision as of 02:42, 23 June 2010

About

Enable the system to calculate purchase price based on product's attributes, using rule defined in the system. It will be easier to modify/calculate new price.

Customized by FMIS

Case Study

We have a product: Test, which has 3 attributes: TN1 (Number), TN2 (Number) and TL1 (List). Price for the product "Test" is as follows: Base Price: 10$

For Attribute TL1

If TL1="Good", bonus of 0.5$, otherwise, deduction of 0.3

For Attribute TN1

0<TN1<1: Deduction of 0.1

1<=TN1<2: No bonus/deduction

2<=TN1<3: Bonus of 0.1

3<=TN1: bonus of 0.2

For Attribute TN2

TN2 <=3: No bonus/deduction

3<TN2: Step bonus of 0.2 for every increase of 1.

We calculate the price at the end of month for all receipts within that month.

Customization

Create Rule: TestPricing

Link: Application Dictionary >> Rule


double tn1=getAttributeNumber("TN1");

double tn2=getAttributeNumber("TN2");

String tl1=getAttributeString("TL1");

double result1=0;

double result2=0;

double result3=0;

if (0<tn1 && tn1<1) result1=-0.1;

if (2<=tn1 && tn1<3) result1=0.1;

if (3<=tn1) result1=0.2;

if (tn2<=3) result2=0;

if (3<tn2) result2 = Math.ceil(tn2-3)*0.2;

if (tl1.equals("Good")) result3=0.5; else result3=-0.3;

result=result1+result2+result3;


Rule.png

Assign Rule to Price List

PriceList.png

Material Receipt

Since we calculate purchase price at the end of month, we have create a "Material Receipt Batch" windows, which covers all tabs from the original "Material Receipt" windows, with a process to create Vendor Invoice for all receipts within the batch windows.

Material Receipt Batch

Batch.png

Material Receipt 1

MRR1.png

We enter the 1st attribute set for our Test Product: AL1="Pass", AN1=0.2, AN2=2.9

MRRL1.png

Material Receipt 2

MRR2.png

We enter the 2nd attribute set for our Test Product: AL2="Good", AN1=3, AN2=3.1

MRRL2.png

We can complete all Material Receipt as normal

Create Vendor Invoice

We then run the "Generate To" button in the InoutBatch to create Vendor Invoice.

CreateInvoice.png

Check Price

Vendor Invoice Line 1 (2nd Receipt), Price = 10.9 = 10 + 0.5 (TL1) + 0.2 (TN2) + 0.2 (TN2)

INVL1.png

Vendor Invoice Line 2 (1st Receipt), Price = 9.8 = 10 - 0.3 (TL1) - 0.1 (TN1) - 0 (TN2)

INVL2.png