Jacopo,
I think we the calcShipmentCostEstimate service in ShipmentServices.java is not accounting for initialEstimateAmt parameters passed in. Looking at implementation initialEstimateAmt holds value from online shipping estimate. Lets say we modify line 445 of ShipmentServices.java file to double flatTotal = orderFlat + itemFlatAmount + orderPercentage + initialEstimateAmt.doubleValue(); Then the value returned will be much more effective for case, From what I understand, along with other things, what you are trying to implement is A store using Online shipping Estimate for shipping Estimate, But they will like to add 10% on top of Shipping Cost as some overhead. In this case all I have to do is set value in shippingPricePercent field of ShipmentCostEstimate table. I'll appreciate comments from others as well. Regards Anil Patel On 4/19/07, [hidden email] <[hidden email]> wrote: > > Author: jacopoc > Date: Thu Apr 19 12:12:04 2007 > New Revision: 530524 > > URL: http://svn.apache.org/viewvc?view=rev&rev=530524 > Log: > Implemented new Shipping Estimate Feature: > Flat Shipping Percent - shipamount=shipamount + (shipamount * percent) > > Modified: > ofbiz/trunk/applications/product/config/ProductUiLabels.properties > ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml > ofbiz/trunk/applications/product/servicedef/services_shipment.xml > > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java > > ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml > > Modified: > ofbiz/trunk/applications/product/config/ProductUiLabels.properties > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?view=diff&rev=530524&r1=530523&r2=530524 > > ============================================================================== > --- ofbiz/trunk/applications/product/config/ProductUiLabels.properties > (original) > +++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Thu > Apr 19 12:12:04 2007 > @@ -604,6 +604,7 @@ > ProductFlatBasePercent=Flat Base Percent > ProductFlatBasePrice=Flat Base Price > ProductFlatItemPrice=Flat Item Price > +ProductFlatShippingPercent=Flat Shipping Percent > ProductFlOz=Fl. Oz. > ProductFromGeo=From Geo > ProductFromLocation=From Location > @@ -1198,6 +1199,7 @@ > ProductShipOrder=Ship Order > ProductShipamountOrderTotalPercent=shipamount=shipamount + (orderTotal * > percent) > ProductShipamountPrice=shipamount=shipamount + price > +ProductShipamountShippingTotalPercent=shipamount=shipamount + (shipamount > * percent) > ProductShipamountTotalQuantityPrice=shipamount=shipamount + (totalQuantity > * price) > ProductShipamount=shipamount > ProductShipmentBoxType=Box Type > > Modified: > ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml?view=diff&rev=530524&r1=530523&r2=530524 > > ============================================================================== > --- ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml > (original) > +++ ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml > Thu Apr 19 12:12:04 2007 > @@ -729,6 +729,7 @@ > <field name="orderFlatPrice" type="currency-amount"></field> > <field name="orderPricePercent" type="floating-point"></field> > <field name="orderItemFlatPrice" type="currency-amount"></field> > + <field name="shippingPricePercent" type="floating-point"></field> > <field name="productFeatureGroupId" type="id"></field> > <field name="oversizeUnit" type="floating-point"></field> > <field name="oversizePrice" type="currency-amount"></field> > > Modified: > ofbiz/trunk/applications/product/servicedef/services_shipment.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment.xml?view=diff&rev=530524&r1=530523&r2=530524 > > ============================================================================== > --- ofbiz/trunk/applications/product/servicedef/services_shipment.xml > (original) > +++ ofbiz/trunk/applications/product/servicedef/services_shipment.xml Thu > Apr 19 12:12:04 2007 > @@ -577,6 +577,7 @@ > <attribute name="flatPercent" type="Double" mode="IN" > optional="false"/> > <attribute name="flatPrice" type="Double" mode="IN" > optional="true"/> > <attribute name="flatItemPrice" type="Double" mode="IN" > optional="true"/> > + <attribute name="shippingPricePercent" type="Double" mode="IN" > optional="true"/> > <attribute name="productFeatureGroupId" type="String" mode="IN" > optional="true"/> > <attribute name="featurePercent" type="Double" mode="IN" > optional="true"/> > <attribute name="featurePrice" type="Double" mode="IN" > optional="true"/> > > Modified: > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?view=diff&rev=530524&r1=530523&r2=530524 > > ============================================================================== > --- > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java > (original) > +++ > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java > Thu Apr 19 12:12:04 2007 > @@ -78,6 +78,7 @@ > estimate.set("orderPricePercent", context.get("flatPercent")); > estimate.set("orderFlatPrice", context.get("flatPrice")); > estimate.set("orderItemFlatPrice", context.get("flatItemPrice")); > + estimate.set("shippingPricePercent", context.get > ("shippingPricePercent")); > estimate.set("productFeatureGroupId", context.get > ("productFeatureGroupId")); > estimate.set("oversizeUnit", context.get("oversizeUnit")); > estimate.set("oversizePrice", context.get("oversizePrice")); > @@ -433,11 +434,16 @@ > if (estimate.getDouble("orderPricePercent") != null) > orderPercent = estimate.getDouble > ("orderPricePercent").doubleValue(); > > + double shippingPricePercent = 0.00; > + if (estimate.getDouble("shippingPricePercent") != null) > + shippingPricePercent = estimate.getDouble > ("shippingPricePercent").doubleValue(); > + > double itemFlatAmount = shippableQuantity.doubleValue() * > orderItemFlat; > double orderPercentage = shippableTotal.doubleValue() * > (orderPercent / 100); > > // flat total > double flatTotal = orderFlat + itemFlatAmount + orderPercentage; > + flatTotal = flatTotal + flatTotal * (shippingPricePercent / 100); > > // spans > double weightUnit = 0.00; > > Modified: > ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml?view=diff&rev=530524&r1=530523&r2=530524 > > ============================================================================== > --- > ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml > (original) > +++ > ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml > Thu Apr 19 12:12:04 2007 > @@ -505,6 +505,7 @@ > <field name="flatPercent" title="${ > uiLabelMap.ProductFlatBasePercent}" tooltip="${ > uiLabelMap.ProductShipamountOrderTotalPercent}"><text/></field> > <field name="flatPrice" title="${uiLabelMap.ProductFlatBasePrice}" > tooltip="${uiLabelMap.ProductShipamountPrice}"><text/></field> > <field name="flatItemPrice" title="${ > uiLabelMap.ProductFlatItemPrice}" tooltip="${ > uiLabelMap.ProductShipamountTotalQuantityPrice}"><text/></field> > + <field name="shippingPricePercent" title="${ > uiLabelMap.ProductFlatShippingPercent}" tooltip="${ > uiLabelMap.ProductShipamountShippingTotalPercent}"><text/></field> > > <field name="FeatureTitle" title=" " > title-area-style="group-label"><display description=" " > also-hidden="false"/></field> > <field name="productFeatureGroupId" title="${ > uiLabelMap.ProductFeatureGroup}" tooltip="${ > uiLabelMap.ProductFeatureMessage}"><text/></field> > @@ -602,6 +603,7 @@ > <field name="orderPricePercent" title="${ > uiLabelMap.ProductFlatBasePercent}" tooltip="${ > uiLabelMap.ProductShipamountOrderTotalPercent}"><display/></field> > <field name="orderFlatPrice" title="${ > uiLabelMap.ProductFlatBasePrice}" tooltip="${ > uiLabelMap.ProductShipamountPrice}"><display/></field> > <field name="orderItemFlatPrice" title="${ > uiLabelMap.ProductFlatItemPrice}" tooltip="${ > uiLabelMap.ProductShipamountTotalQuantityPrice}"><display/></field> > + <field name="shippingPricePercent" title="${ > uiLabelMap.ProductFlatShippingPercent}" tooltip="${ > uiLabelMap.ProductShipamountShippingTotalPercent}"><display/></field> > > <field name="FeatureTitle" title=" " > title-area-style="group-label"><display description=" " > also-hidden="false"/></field> > <field name="productFeatureGroupId" title="${ > uiLabelMap.ProductFeatureGroup}" tooltip="${ > uiLabelMap.ProductFeatureMessage}"><display/></field> > > > |
The modification I proposed should be rather.
flatTotal = flatTotal + (flatTotal + initialEstimateAmt.doubleValue()) * (shippingPricePercent / 100); Regards Anil Patel On 5/18/07, Anil Patel <[hidden email]> wrote: > > Jacopo, > I think we the calcShipmentCostEstimate service in ShipmentServices.javais not accounting for initialEstimateAmt parameters passed in. Looking at > implementation initialEstimateAmt holds value from online shipping estimate. > > > Lets say we modify line 445 of ShipmentServices.java file to > > double flatTotal = orderFlat + itemFlatAmount + orderPercentage + > initialEstimateAmt.doubleValue(); > > Then the value returned will be much more effective for case, From what I > understand, along with other things, what you are trying to implement is > > A store using Online shipping Estimate for shipping Estimate, But they > will like to add 10% on top of Shipping Cost as some overhead. In this case > all I have to do is set value in shippingPricePercent field of > ShipmentCostEstimate table. > > I'll appreciate comments from others as well. > > Regards > Anil Patel > > > > > On 4/19/07, [hidden email] <[hidden email]> wrote: > > > > Author: jacopoc > > Date: Thu Apr 19 12:12:04 2007 > > New Revision: 530524 > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=530524 > > Log: > > Implemented new Shipping Estimate Feature: > > Flat Shipping Percent - shipamount=shipamount + (shipamount * percent) > > > > Modified: > > ofbiz/trunk/applications/product/config/ProductUiLabels.properties > > ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml > > ofbiz/trunk/applications/product/servicedef/services_shipment.xml > > > > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java > > ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml > > > > > > Modified: > > ofbiz/trunk/applications/product/config/ProductUiLabels.properties > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?view=diff&rev=530524&r1=530523&r2=530524 > > ============================================================================== > > > > --- ofbiz/trunk/applications/product/config/ProductUiLabels.properties > > (original) > > +++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties > > Thu Apr 19 12:12:04 2007 > > @@ -604,6 +604,7 @@ > > ProductFlatBasePercent=Flat Base Percent > > ProductFlatBasePrice=Flat Base Price > > ProductFlatItemPrice=Flat Item Price > > +ProductFlatShippingPercent=Flat Shipping Percent > > ProductFlOz=Fl. Oz. > > ProductFromGeo=From Geo > > ProductFromLocation=From Location > > @@ -1198,6 +1199,7 @@ > > ProductShipOrder=Ship Order > > ProductShipamountOrderTotalPercent=shipamount=shipamount + (orderTotal * > > percent) > > ProductShipamountPrice=shipamount=shipamount + price > > +ProductShipamountShippingTotalPercent=shipamount=shipamount + > > (shipamount * percent) > > ProductShipamountTotalQuantityPrice=shipamount=shipamount + > > (totalQuantity * price) > > ProductShipamount=shipamount > > ProductShipmentBoxType=Box Type > > > > Modified: > > ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml?view=diff&rev=530524&r1=530523&r2=530524 > > > > > > ============================================================================== > > --- ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml > > (original) > > +++ ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml > > Thu Apr 19 12:12:04 2007 > > @@ -729,6 +729,7 @@ > > <field name="orderFlatPrice" type="currency-amount"></field> > > <field name="orderPricePercent" type="floating-point"></field> > > <field name="orderItemFlatPrice" type="currency-amount"></field> > > + <field name="shippingPricePercent" type="floating-point"></field> > > <field name="productFeatureGroupId" type="id"></field> > > <field name="oversizeUnit" type="floating-point"></field> > > <field name="oversizePrice" type="currency-amount"></field> > > > > Modified: > > ofbiz/trunk/applications/product/servicedef/services_shipment.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment.xml?view=diff&rev=530524&r1=530523&r2=530524 > > > > > > ============================================================================== > > --- ofbiz/trunk/applications/product/servicedef/services_shipment.xml > > (original) > > +++ ofbiz/trunk/applications/product/servicedef/services_shipment.xml > > Thu Apr 19 12:12:04 2007 > > @@ -577,6 +577,7 @@ > > <attribute name="flatPercent" type="Double" mode="IN" > > optional="false"/> > > <attribute name="flatPrice" type="Double" mode="IN" > > optional="true"/> > > <attribute name="flatItemPrice" type="Double" mode="IN" > > optional="true"/> > > + <attribute name="shippingPricePercent" type="Double" mode="IN" > > optional="true"/> > > <attribute name="productFeatureGroupId" type="String" mode="IN" > > optional="true"/> > > <attribute name="featurePercent" type="Double" mode="IN" > > optional="true"/> > > <attribute name="featurePrice" type="Double" mode="IN" > > optional="true"/> > > > > Modified: > > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java > > > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?view=diff&rev=530524&r1=530523&r2=530524 > > > > > > ============================================================================== > > --- > > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java > > (original) > > +++ > > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java > > Thu Apr 19 12:12:04 2007 > > @@ -78,6 +78,7 @@ > > estimate.set("orderPricePercent", context.get("flatPercent")); > > estimate.set("orderFlatPrice", context.get("flatPrice")); > > estimate.set ("orderItemFlatPrice", context.get > > ("flatItemPrice")); > > + estimate.set("shippingPricePercent", context.get > > ("shippingPricePercent")); > > estimate.set("productFeatureGroupId", context.get > > ("productFeatureGroupId")); > > estimate.set("oversizeUnit", context.get("oversizeUnit")); > > estimate.set("oversizePrice", context.get("oversizePrice")); > > @@ -433,11 +434,16 @@ > > if (estimate.getDouble("orderPricePercent") != null) > > orderPercent = estimate.getDouble > > ("orderPricePercent").doubleValue(); > > > > + double shippingPricePercent = 0.00; > > + if (estimate.getDouble("shippingPricePercent") != null) > > + shippingPricePercent = estimate.getDouble > > ("shippingPricePercent").doubleValue(); > > + > > double itemFlatAmount = shippableQuantity.doubleValue() * > > orderItemFlat; > > double orderPercentage = shippableTotal.doubleValue() * > > (orderPercent / 100); > > > > // flat total > > double flatTotal = orderFlat + itemFlatAmount + > > orderPercentage; > > + flatTotal = flatTotal + flatTotal * (shippingPricePercent / > > 100); > > > > // spans > > double weightUnit = 0.00; > > > > Modified: > > ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml?view=diff&rev=530524&r1=530523&r2=530524 > > > > > > ============================================================================== > > --- > > ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml > > (original) > > +++ > > ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml > > Thu Apr 19 12:12:04 2007 > > @@ -505,6 +505,7 @@ > > <field name="flatPercent" title="${ > > uiLabelMap.ProductFlatBasePercent}" tooltip="${ > > uiLabelMap.ProductShipamountOrderTotalPercent}"><text/></field> > > <field name="flatPrice" title="${ > > uiLabelMap.ProductFlatBasePrice}" tooltip="${ > > uiLabelMap.ProductShipamountPrice}"><text/></field> > > <field name="flatItemPrice" title="${ > > uiLabelMap.ProductFlatItemPrice}" tooltip="${ > > uiLabelMap.ProductShipamountTotalQuantityPrice}"><text/></field> > > + <field name="shippingPricePercent" title="${ > > uiLabelMap.ProductFlatShippingPercent }" tooltip="${ > > uiLabelMap.ProductShipamountShippingTotalPercent}"><text/></field> > > > > <field name="FeatureTitle" title=" " > > title-area-style="group-label"><display description=" " > > also-hidden="false"/></field> > > <field name="productFeatureGroupId" title="${ > > uiLabelMap.ProductFeatureGroup}" tooltip="${ > > uiLabelMap.ProductFeatureMessage}"><text/></field> > > @@ -602,6 +603,7 @@ > > <field name="orderPricePercent" title="${ > > uiLabelMap.ProductFlatBasePercent}" tooltip="${ > > uiLabelMap.ProductShipamountOrderTotalPercent}"><display/></field> > > <field name="orderFlatPrice" title="${ > > uiLabelMap.ProductFlatBasePrice}" tooltip="${ > > uiLabelMap.ProductShipamountPrice}"><display/></field> > > <field name="orderItemFlatPrice" title="${ > > uiLabelMap.ProductFlatItemPrice }" tooltip="${ > > uiLabelMap.ProductShipamountTotalQuantityPrice}"><display/></field> > > + <field name="shippingPricePercent" title="${ > > uiLabelMap.ProductFlatShippingPercent }" tooltip="${ > > uiLabelMap.ProductShipamountShippingTotalPercent}"><display/></field> > > > > <field name="FeatureTitle" title=" " > > title-area-style="group-label"><display description=" " > > also-hidden="false"/></field> > > <field name="productFeatureGroupId" title="${ > > uiLabelMap.ProductFeatureGroup}" tooltip="${ > > uiLabelMap.ProductFeatureMessage}"><display/></field> > > > > > > > |
Yeah, I agree. But I also think this should include all shipping fees
as well; not just the flat amounts. I'll move it to the end.. Andrew On May 18, 2007, at 9:22 PM, Anil Patel wrote: > The modification I proposed should be rather. > > flatTotal = flatTotal + (flatTotal + > initialEstimateAmt.doubleValue()) > * (shippingPricePercent / 100); > > > Regards > Anil Patel > > > On 5/18/07, Anil Patel <[hidden email]> wrote: >> >> Jacopo, >> I think we the calcShipmentCostEstimate service in >> ShipmentServices.javais not accounting for initialEstimateAmt >> parameters passed in. Looking at >> implementation initialEstimateAmt holds value from online shipping >> estimate. >> >> >> Lets say we modify line 445 of ShipmentServices.java file to >> >> double flatTotal = orderFlat + itemFlatAmount + orderPercentage + >> initialEstimateAmt.doubleValue(); >> >> Then the value returned will be much more effective for case, From >> what I >> understand, along with other things, what you are trying to >> implement is >> >> A store using Online shipping Estimate for shipping Estimate, But >> they >> will like to add 10% on top of Shipping Cost as some overhead. In >> this case >> all I have to do is set value in shippingPricePercent field of >> ShipmentCostEstimate table. >> >> I'll appreciate comments from others as well. >> >> Regards >> Anil Patel >> >> >> >> >> On 4/19/07, [hidden email] <[hidden email]> wrote: >> > >> > Author: jacopoc >> > Date: Thu Apr 19 12:12:04 2007 >> > New Revision: 530524 >> > >> > URL: http://svn.apache.org/viewvc?view=rev&rev=530524 >> > Log: >> > Implemented new Shipping Estimate Feature: >> > Flat Shipping Percent - shipamount=shipamount + (shipamount * >> percent) >> > >> > Modified: >> > ofbiz/trunk/applications/product/config/ >> ProductUiLabels.properties >> > ofbiz/trunk/applications/product/entitydef/ >> entitymodel_shipment.xml >> > ofbiz/trunk/applications/product/servicedef/ >> services_shipment.xml >> > >> > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/ >> shipment/ShipmentServices.java >> > ofbiz/trunk/applications/product/webapp/catalog/store/ >> ProductStoreForms.xml >> > >> > >> > Modified: >> > ofbiz/trunk/applications/product/config/ProductUiLabels.properties >> > URL: >> > http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ >> config/ProductUiLabels.properties? >> view=diff&rev=530524&r1=530523&r2=530524 >> > >> ===================================================================== >> ========= >> > >> > --- ofbiz/trunk/applications/product/config/ >> ProductUiLabels.properties >> > (original) >> > +++ ofbiz/trunk/applications/product/config/ >> ProductUiLabels.properties >> > Thu Apr 19 12:12:04 2007 >> > @@ -604,6 +604,7 @@ >> > ProductFlatBasePercent=Flat Base Percent >> > ProductFlatBasePrice=Flat Base Price >> > ProductFlatItemPrice=Flat Item Price >> > +ProductFlatShippingPercent=Flat Shipping Percent >> > ProductFlOz=Fl. Oz. >> > ProductFromGeo=From Geo >> > ProductFromLocation=From Location >> > @@ -1198,6 +1199,7 @@ >> > ProductShipOrder=Ship Order >> > ProductShipamountOrderTotalPercent=shipamount=shipamount + >> (orderTotal * >> > percent) >> > ProductShipamountPrice=shipamount=shipamount + price >> > +ProductShipamountShippingTotalPercent=shipamount=shipamount + >> > (shipamount * percent) >> > ProductShipamountTotalQuantityPrice=shipamount=shipamount + >> > (totalQuantity * price) >> > ProductShipamount=shipamount >> > ProductShipmentBoxType=Box Type >> > >> > Modified: >> > ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml >> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ >> product/entitydef/entitymodel_shipment.xml? >> view=diff&rev=530524&r1=530523&r2=530524 >> > >> > >> > >> ===================================================================== >> ========= >> > --- ofbiz/trunk/applications/product/entitydef/ >> entitymodel_shipment.xml >> > (original) >> > +++ ofbiz/trunk/applications/product/entitydef/ >> entitymodel_shipment.xml >> > Thu Apr 19 12:12:04 2007 >> > @@ -729,6 +729,7 @@ >> > <field name="orderFlatPrice" type="currency-amount"></field> >> > <field name="orderPricePercent" type="floating-point"></ >> field> >> > <field name="orderItemFlatPrice" type="currency-amount"></ >> field> >> > + <field name="shippingPricePercent" type="floating- >> point"></field> >> > <field name="productFeatureGroupId" type="id"></field> >> > <field name="oversizeUnit" type="floating-point"></field> >> > <field name="oversizePrice" type="currency-amount"></field> >> > >> > Modified: >> > ofbiz/trunk/applications/product/servicedef/services_shipment.xml >> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ >> product/servicedef/services_shipment.xml? >> view=diff&rev=530524&r1=530523&r2=530524 >> > >> > >> > >> ===================================================================== >> ========= >> > --- ofbiz/trunk/applications/product/servicedef/ >> services_shipment.xml >> > (original) >> > +++ ofbiz/trunk/applications/product/servicedef/ >> services_shipment.xml >> > Thu Apr 19 12:12:04 2007 >> > @@ -577,6 +577,7 @@ >> > <attribute name="flatPercent" type="Double" mode="IN" >> > optional="false"/> >> > <attribute name="flatPrice" type="Double" mode="IN" >> > optional="true"/> >> > <attribute name="flatItemPrice" type="Double" mode="IN" >> > optional="true"/> >> > + <attribute name="shippingPricePercent" type="Double" >> mode="IN" >> > optional="true"/> >> > <attribute name="productFeatureGroupId" type="String" >> mode="IN" >> > optional="true"/> >> > <attribute name="featurePercent" type="Double" mode="IN" >> > optional="true"/> >> > <attribute name="featurePrice" type="Double" mode="IN" >> > optional="true"/> >> > >> > Modified: >> > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ >> ShipmentServices.java >> > >> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ >> product/src/org/ofbiz/shipment/shipment/ShipmentServices.java? >> view=diff&rev=530524&r1=530523&r2=530524 >> > >> > >> > >> ===================================================================== >> ========= >> > --- >> > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ >> ShipmentServices.java >> > (original) >> > +++ >> > ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ >> ShipmentServices.java >> > Thu Apr 19 12:12:04 2007 >> > @@ -78,6 +78,7 @@ >> > estimate.set("orderPricePercent", context.get >> ("flatPercent")); >> > estimate.set("orderFlatPrice", context.get("flatPrice")); >> > estimate.set ("orderItemFlatPrice", context.get >> > ("flatItemPrice")); >> > + estimate.set("shippingPricePercent", context.get >> > ("shippingPricePercent")); >> > estimate.set("productFeatureGroupId", context.get >> > ("productFeatureGroupId")); >> > estimate.set("oversizeUnit", context.get("oversizeUnit")); >> > estimate.set("oversizePrice", context.get >> ("oversizePrice")); >> > @@ -433,11 +434,16 @@ >> > if (estimate.getDouble("orderPricePercent") != null) >> > orderPercent = estimate.getDouble >> > ("orderPricePercent").doubleValue(); >> > >> > + double shippingPricePercent = 0.00; >> > + if (estimate.getDouble("shippingPricePercent") != null) >> > + shippingPricePercent = estimate.getDouble >> > ("shippingPricePercent").doubleValue(); >> > + >> > double itemFlatAmount = shippableQuantity.doubleValue() * >> > orderItemFlat; >> > double orderPercentage = shippableTotal.doubleValue() * >> > (orderPercent / 100); >> > >> > // flat total >> > double flatTotal = orderFlat + itemFlatAmount + >> > orderPercentage; >> > + flatTotal = flatTotal + flatTotal * >> (shippingPricePercent / >> > 100); >> > >> > // spans >> > double weightUnit = 0.00; >> > >> > Modified: >> > ofbiz/trunk/applications/product/webapp/catalog/store/ >> ProductStoreForms.xml >> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ >> product/webapp/catalog/store/ProductStoreForms.xml? >> view=diff&rev=530524&r1=530523&r2=530524 >> > >> > >> > >> ===================================================================== >> ========= >> > --- >> > ofbiz/trunk/applications/product/webapp/catalog/store/ >> ProductStoreForms.xml >> > (original) >> > +++ >> > ofbiz/trunk/applications/product/webapp/catalog/store/ >> ProductStoreForms.xml >> > Thu Apr 19 12:12:04 2007 >> > @@ -505,6 +505,7 @@ >> > <field name="flatPercent" title="${ >> > uiLabelMap.ProductFlatBasePercent}" tooltip="${ >> > uiLabelMap.ProductShipamountOrderTotalPercent}"><text/></field> >> > <field name="flatPrice" title="${ >> > uiLabelMap.ProductFlatBasePrice}" tooltip="${ >> > uiLabelMap.ProductShipamountPrice}"><text/></field> >> > <field name="flatItemPrice" title="${ >> > uiLabelMap.ProductFlatItemPrice}" tooltip="${ >> > uiLabelMap.ProductShipamountTotalQuantityPrice}"><text/></field> >> > + <field name="shippingPricePercent" title="${ >> > uiLabelMap.ProductFlatShippingPercent }" tooltip="${ >> > uiLabelMap.ProductShipamountShippingTotalPercent}"><text/></field> >> > >> > <field name="FeatureTitle" title=" " >> > title-area-style="group-label"><display description=" " >> > also-hidden="false"/></field> >> > <field name="productFeatureGroupId" title="${ >> > uiLabelMap.ProductFeatureGroup}" tooltip="${ >> > uiLabelMap.ProductFeatureMessage}"><text/></field> >> > @@ -602,6 +603,7 @@ >> > <field name="orderPricePercent" title="${ >> > uiLabelMap.ProductFlatBasePercent}" tooltip="${ >> > uiLabelMap.ProductShipamountOrderTotalPercent}"><display/></field> >> > <field name="orderFlatPrice" title="${ >> > uiLabelMap.ProductFlatBasePrice}" tooltip="${ >> > uiLabelMap.ProductShipamountPrice}"><display/></field> >> > <field name="orderItemFlatPrice" title="${ >> > uiLabelMap.ProductFlatItemPrice }" tooltip="${ >> > uiLabelMap.ProductShipamountTotalQuantityPrice}"><display/></field> >> > + <field name="shippingPricePercent" title="${ >> > uiLabelMap.ProductFlatShippingPercent }" tooltip="${ >> > uiLabelMap.ProductShipamountShippingTotalPercent}"><display/></ >> field> >> > >> > <field name="FeatureTitle" title=" " >> > title-area-style="group-label"><display description=" " >> > also-hidden="false"/></field> >> > <field name="productFeatureGroupId" title="${ >> > uiLabelMap.ProductFeatureGroup}" tooltip="${ >> > uiLabelMap.ProductFeatureMessage}"><display/></field> >> > >> > >> > >> smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |