Isn't this http://mail-archives.apache.org/mod_mbox/ofbiz-dev/200804.mbox/[EMAIL PROTECTED] a similar enumeration abuse?
-Bruno 2008/4/23 Scott Gray <[EMAIL PROTECTED]>: > Hi David > > Curiosity got the better of me, Si put it in last year, so I wouldn't hold > your breathe for a response on this. > > Regards > Scott > > 2008/4/23 David E Jones <[EMAIL PROTECTED]>: > > > > > I recently noticed the following lines in the AccountingTypeData.xml > file > > (starting around line 511): > > > > <!-- An Enumeration to identify the taxable invoice item types. For > > these, the only important fields are enumId and enumTypeId. --> > > <EnumerationType description="Taxable Invoice Item Types" > > enumTypeId="TAXABLE_INV_ITM_TY" hasTable="N" parentTypeId=""/> > > <Enumeration description="Sales Invoice Sales Tax" > > enumCode="INV_SALES_TAX" enumId="INV_SALES_TAX" sequenceId="01" > > enumTypeId="TAXABLE_INV_ITM_TY"/> > > <Enumeration description="Sales Invoice Line Item Sales Tax" > > enumCode="ITM_SALES_TAX" enumId="ITM_SALES_TAX" sequenceId="02" > > enumTypeId="TAXABLE_INV_ITM_TY"/> > > <Enumeration description="Purchase Invoice Sales Tax" > > enumCode="PINV_SALES_TAX" enumId="PINV_SALES_TAX" sequenceId="03" > > enumTypeId="TAXABLE_INV_ITM_TY"/> > > <Enumeration description="Purchase Invoice Line Item Sales Tax" > > enumCode="PITM_SALES_TAX" enumId="PITM_SALES_TAX" sequenceId="04" > > enumTypeId="TAXABLE_INV_ITM_TY"/> > > <Enumeration description="Customer Return Sales Tax Adjustment" > > enumCode="CRT_SALES_TAX_ADJ" enumId="CRT_SALES_TAX_ADJ" sequenceId="05" > > enumTypeId="TAXABLE_INV_ITM_TY"/> > > > > The point of these records seem to be to define the set of > > InventoryItemType records that are taxable... although that doesn't seem > > correct as it doesn't describe the "taxable" types, but rather the "tax" > > types. > > > > One of the great benefits of having a specific entity for types rather > > than using something generic like the Enumeration entity is that we can > add > > fields like an "isTax" flag, which seems to be a more effective and > tenable > > option for this. > > > > I haven't traced back to see who wrote or committed this, but it does > > break common patterns and may not be the easiest way to implement what > seems > > to be targeted by these records. > > > > -David > > > > >
