Hi Nicolas, your definition of the UomConvSource looks good to me; my only concern would be that of introducing an entity that duplicates most of the data of UomConversionDated; so maybe I would be more inclined to modifying the existing UomConversionDated entity as you have described.
Jacopo On Jan 13, 2015, at 4:32 PM, Nicolas Malin <[email protected]> wrote: > Hi, > > With the current customer project I need to manage some currency conversion > rate during a period, a purpose and between two party. > The main case is the Euro company who work with American Supplier and sign a > agreement exchange rate to stabilize their invoicing and payment instead of > follow the stock exchange. > > At this time the first two has covered by UomConversionDated, but nothing is > present two indicate what is my currency conversion rate with an other > company. > > It's easy to solve with Agreement entity, a dedicate agreementTypeId and add > an assoc entity AgreementUomConversionDatedAppl. > An other problem, it's impossible to define different rate for the same > currency at the same date like this > uomId uomIdTo fromDate rate > EUR USD 2015-01-01 00:00:00 1.200 -> use by an agreement between > MyCompany - Mc Company > EUR USD 2015-01-01 00:00:00 1.258 -> use by an agreement between > MyCompany - Mc Society > EUR USD 2015-01-01 00:00:00 1.248 -> use by an agreement between > MySubsidiaryCompany - Mc Society > > My first idea would be move UomConversionDated on single pk > uomConversionDatedId but I prefer to adding a new entity like : > > UomConvSource > uomConvSourceId * > uomId > uomIdTo > fromDate > thruDate > conversionFactor > customMethodId > decimalScale > roundingMode > purposeEnumId > > And : > AgreementUomConvSourceAppl > agreementId * > uomConvSourceId * > > With this, I will do add helper service to resolve the conversion rate from a > context with the step : > * scanning Agreement > * scanning UomConversionDated > * scanning UomConversion > > Any remarks and suggest are welcome as usual ;) > > -- > #jeSuisCharlie (et j'emmerde les lobbotomisés) > <siteon0.jpg> > Nicolas Malin > Responsable Interplanétaire de la reproduction des crevettes licorne en > apesanteur astral > [email protected] > 3bis rue des Isles 37270 VERETZ 02 47 50 30 54 > Apache OFBiz | ofbiz-fr | | réseau LE
