|
Modified: ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/party/PartyServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original) +++ ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/party/PartyServices.xml Tue Dec 7 10:42:16 2010 @@ -680,7 +680,7 @@ under the License. <!-- first try to find primary email Address when not found get other email --> <entity-and entity-name="PartyContactWithPurpose" list="emailAddressesPurposes"> <field-map field-name="partyId" from-field="parameters.partyId"/> - <field-map field-name="contactMechPurposeTypeId" value="PRIMARY_EMAIL"/> + <field-map field-name="contactMechPurposeTypeId" from-field="parameters.contactMechPurposeTypeId"/> </entity-and> <filter-list-by-date list="emailAddressesPurposes" to-list="emailAddressesPurposes1" from-field-name="purposeFromDate" thru-field-name="purposeThruDate"/> <filter-list-by-date list="emailAddressesPurposes1" to-list="emailAddresses" from-field-name="contactFromDate" thru-field-name="contactThruDate"/> Modified: ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/test/PartyContactMechTests.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/test/PartyContactMechTests.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/test/PartyContactMechTests.xml (original) +++ ofbiz/branches/jquery/applications/party/script/org/ofbiz/party/test/PartyContactMechTests.xml Tue Dec 7 10:42:16 2010 @@ -26,7 +26,7 @@ under the License. <set field="contactMechTypeId" value="EMAIL_ADDRESS"/> <!-- first try with just updating without changing the email address --> <set field="serviceCtx.partyId" from-field="partyId"/> - <set field="serviceCtx.emailAddress" value="[hidden email]"/> + <set field="serviceCtx.emailAddress" value="[hidden email]"/> <set field="serviceCtx.contactMechId" value="9026"/> <entity-one entity-name="UserLogin" value-field="userLogin"> <field-map field-name="userLoginId" value="system"/> @@ -46,7 +46,7 @@ under the License. <clear-field field="contactMech"/> <!-- now update with changing the email address, a new record will be created in ContactMech entity this time --> - <set field="serviceCtx.emailAddress" value="[hidden email]"/> + <set field="serviceCtx.emailAddress" value="[hidden email]"/> <call-service service-name="updatePartyEmailAddress" in-map-name="serviceCtx"> <result-to-field result-name="contactMechId" field="newContactMechId"/> </call-service> Modified: ofbiz/branches/jquery/applications/party/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/servicedef/services.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/servicedef/services.xml (original) +++ ofbiz/branches/jquery/applications/party/servicedef/services.xml Tue Dec 7 10:42:16 2010 @@ -1003,6 +1003,7 @@ under the License. location="component://party/script/org/ofbiz/party/party/PartyServices.xml" invoke="getPartyEmail" auth="false"> <description>Get the main party Email address</description> <attribute name="partyId" type="String" mode="IN" optional="false"/> + <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="false" default-value="PRIMARY_EMAIL"/> <attribute name="emailAddress" type="String" mode="OUT" optional="true"/> <attribute name="contactMechId" type="String" mode="OUT" optional="true"/> </service> Propchange: ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Dec 7 10:42:16 2010 @@ -1,3 +1,3 @@ /incubator/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:418499-490456 /ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:921280-927264 -/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-1040441 +/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-1042956 Modified: ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Content.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Content.ftl?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Content.ftl (original) +++ ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Content.ftl Tue Dec 7 10:42:16 2010 @@ -33,6 +33,11 @@ under the License. <input type="hidden" name="statusId" value="CTNT_PUBLISHED"/> <input type="hidden" name="partyId" value="${partyId}" id="contentPartyId"/> <input type="file" name="uploadedFile" size="20"/> + <div class="label">${uiLabelMap.PartyIsPublic}</div> + <select name="isPublic"> + <option value="N">${uiLabelMap.CommonNo}</option> + <option value="Y">${uiLabelMap.CommonYes}</option> + </select> <select name="partyContentTypeId"> <option value="">${uiLabelMap.PartySelectPurpose}</option> <#list partyContentTypes as partyContentType> Modified: ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml (original) +++ ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml Tue Dec 7 10:42:16 2010 @@ -1,95 +1,95 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> - - <form name="FindVisits" type="single" target="findVisits" title="Find and list party visits" - header-row-style="header-row" default-table-style="basic-table"> - <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> - - <field name="activeOnly"><check /></field> - <field name="visitId"><text-find ignore-case="true"/></field> - <field name="visitorId"><text-find ignore-case="true"/></field> - <field name="partyId"><lookup target-form-name="LookupPartyName"/></field> - <field name="userLoginId"><text-find ignore-case="true"/></field> - <field name="userCreated"><date-find type="date"/></field> - <field name="webappName"><text-find ignore-case="true"/></field> - <field name="clientIpAddress"><text-find ignore-case="true"/></field> - - <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> - </form> - - <form name="ListVisits" type="list" separate-columns="true" title="Visits List" list-name="listIt" target="" default-entity-name="Visit" paginate-target="findVisits" - odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> - <actions> - <set field="parameters.sortField" from-field="parameters.sortField" default-value="-visitId"/> - - <service service-name="performFind" result-map="result" result-map-list="listIt"> - <field-map field-name="inputFields" from-field="parameters"/> - <field-map field-name="entityName" value="Visit"/> - <field-map field-name="orderBy" from-field="parameters.sortField"/> - <field-map field-name="viewIndex" from-field="viewIndex"/> - <field-map field-name="viewSize" from-field="viewSize"/> - <field-map field-name="filterByDate" from-field="parameters.activeOnly"/> - </service> - </actions> - - <field name="visitId" widget-style="buttontext" sort-field="true"> - <hyperlink description="${visitId}" target="visitdetail"> - <parameter param-name="visitId"/> - </hyperlink> - </field> - <field name="visitorId" title="${uiLabelMap.PartyVisitorId}" sort-field="true"><display/></field> - <field name="partyId" widget-style="buttontext" sort-field="true"> - <hyperlink description="${partyId}" target="viewprofile"> - <parameter param-name="partyId"/> - </hyperlink> - </field> - <field name="userLoginId" title="${uiLabelMap.PartyUserLoginId}" sort-field="true"><display/></field> - <field name="userCreated" title="${uiLabelMap.PartyNewUser}" sort-field="true"><display/></field> - <field name="webappName" title="${uiLabelMap.PartyWebApp}" sort-field="true"><display/></field> - <field name="clientIpAddress" title="${uiLabelMap.PartyClientIP}" sort-field="true"><display/></field> - <field name="fromDate" title="${uiLabelMap.CommonFromDate}" sort-field="true"><display/></field> - <field name="thruDate" title="${uiLabelMap.CommonThruDate}" sort-field="true"><display/></field> - </form> - - <form name="ListLoggedInUsers" type="list" separate-columns="true" title="Visits List" list-name="listIt" target="" default-entity-name="Visit" paginate-target="listLoggedInUsers" - odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> - <actions> - <set field="parameters.sortField" from-field="parameters.sortField" default-value="-userLoginId"/> - <entity-condition entity-name="Visit" list="listIt" distinct="true" filter-by-date="true"> - <condition-expr field-name="userLoginId" operator="not-equals" from-field="null"/> - <select-field field-name="partyId"/> - <select-field field-name="userLoginId"/> - <select-field field-name="clientIpAddress"/> - <order-by field-name="${parameters.sortField}"/> - </entity-condition> - </actions> - - <field name="userLoginId" title="${uiLabelMap.PartyUserLoginId}" sort-field="true"><display/></field> - <field name="partyId" widget-style="buttontext" sort-field="true"> - <hyperlink description="${partyId}" target="viewprofile"> - <parameter param-name="partyId"/> - </hyperlink> - </field> - <field name="clientIpAddress" title="${uiLabelMap.PartyClientIP}" sort-field="true"><display/></field> - </form> -</forms> +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> + + <form name="FindVisits" type="single" target="findVisits" title="Find and list party visits" + header-row-style="header-row" default-table-style="basic-table"> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> + + <field name="activeOnly"><check /></field> + <field name="visitId"><text-find ignore-case="true"/></field> + <field name="visitorId"><text-find ignore-case="true"/></field> + <field name="partyId"><lookup target-form-name="LookupPartyName"/></field> + <field name="userLoginId"><text-find ignore-case="true"/></field> + <field name="userCreated"><date-find type="date"/></field> + <field name="webappName"><text-find ignore-case="true"/></field> + <field name="clientIpAddress"><text-find ignore-case="true"/></field> + + <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + + <form name="ListVisits" type="list" separate-columns="true" title="Visits List" list-name="listIt" target="" default-entity-name="Visit" paginate-target="findVisits" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <set field="parameters.sortField" from-field="parameters.sortField" default-value="-visitId"/> + + <service service-name="performFind" result-map="result" result-map-list="listIt"> + <field-map field-name="inputFields" from-field="parameters"/> + <field-map field-name="entityName" value="Visit"/> + <field-map field-name="orderBy" from-field="parameters.sortField"/> + <field-map field-name="viewIndex" from-field="viewIndex"/> + <field-map field-name="viewSize" from-field="viewSize"/> + <field-map field-name="filterByDate" from-field="parameters.activeOnly"/> + </service> + </actions> + + <field name="visitId" widget-style="buttontext" sort-field="true"> + <hyperlink description="${visitId}" target="visitdetail"> + <parameter param-name="visitId"/> + </hyperlink> + </field> + <field name="visitorId" title="${uiLabelMap.PartyVisitorId}" sort-field="true"><display/></field> + <field name="partyId" widget-style="buttontext" sort-field="true"> + <hyperlink description="${partyId}" target="viewprofile"> + <parameter param-name="partyId"/> + </hyperlink> + </field> + <field name="userLoginId" title="${uiLabelMap.PartyUserLoginId}" sort-field="true"><display/></field> + <field name="userCreated" title="${uiLabelMap.PartyNewUser}" sort-field="true"><display/></field> + <field name="webappName" title="${uiLabelMap.PartyWebApp}" sort-field="true"><display/></field> + <field name="clientIpAddress" title="${uiLabelMap.PartyClientIP}" sort-field="true"><display/></field> + <field name="fromDate" title="${uiLabelMap.CommonFromDate}" sort-field="true"><display/></field> + <field name="thruDate" title="${uiLabelMap.CommonThruDate}" sort-field="true"><display/></field> + </form> + + <form name="ListLoggedInUsers" type="list" separate-columns="true" title="Visits List" list-name="listIt" target="" default-entity-name="Visit" paginate-target="listLoggedInUsers" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <set field="parameters.sortField" from-field="parameters.sortField" default-value="-userLoginId"/> + <entity-condition entity-name="Visit" list="listIt" distinct="true" filter-by-date="true"> + <condition-expr field-name="userLoginId" operator="not-equals" from-field="null"/> + <select-field field-name="partyId"/> + <select-field field-name="userLoginId"/> + <select-field field-name="clientIpAddress"/> + <order-by field-name="${parameters.sortField}"/> + </entity-condition> + </actions> + + <field name="userLoginId" title="${uiLabelMap.PartyUserLoginId}" sort-field="true"><display/></field> + <field name="partyId" widget-style="buttontext" sort-field="true"> + <hyperlink description="${partyId}" target="viewprofile"> + <parameter param-name="partyId"/> + </hyperlink> + </field> + <field name="clientIpAddress" title="${uiLabelMap.PartyClientIP}" sort-field="true"><display/></field> + </form> +</forms> Modified: ofbiz/branches/jquery/applications/product/config/ImageProperties.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/config/ImageProperties.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/config/ImageProperties.xml (original) +++ ofbiz/branches/jquery/applications/product/config/ImageProperties.xml Tue Dec 7 10:42:16 2010 @@ -20,19 +20,19 @@ under the License. <imageSize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <format name="extension" value="jpg"/> <size name="small"> + <dimension name="height" value="50"/> + <dimension name="width" value="50"/> + </size> + <size name="medium"> <dimension name="height" value="100"/> <dimension name="width" value="100"/> </size> - <size name="medium"> + <size name="large"> <dimension name="height" value="200"/> <dimension name="width" value="200"/> </size> - <size name="large"> + <size name="detail"> <dimension name="height" value="600"/> <dimension name="width" value="600"/> </size> - <size name="detail"> - <dimension name="height" value="1500"/> - <dimension name="width" value="1500"/> - </size> </imageSize> Modified: ofbiz/branches/jquery/applications/product/config/ProductEntityLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/config/ProductEntityLabels.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/config/ProductEntityLabels.xml (original) +++ ofbiz/branches/jquery/applications/product/config/ProductEntityLabels.xml Tue Dec 7 10:42:16 2010 @@ -1028,24 +1028,88 @@ <value xml:lang="zh">å¾å - é¢å¤æ£æ¥1</value> <value xml:lang="zh_TW">åå - é¡å¤æª¢æ¥1</value> </property> + <property key="ProductContentType.description.XTRA_IMG_1_SMALL"> + <value xml:lang="en">Image - Additional View 1 Small</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 1 piccola</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_1_MEDIUM"> + <value xml:lang="en">Image - Additional View 1 Medium</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 1 media</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_1_LARGE"> + <value xml:lang="en">Image - Additional View 1 Large</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 1 grande</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_1_DETAIL"> + <value xml:lang="en">Image - Additional View 1 Detail</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 1 dettaglio</value> + </property> <property key="ProductContentType.description.ADDITIONAL_IMAGE_2"> <value xml:lang="en">Image - Additional View 2</value> <value xml:lang="it">Immagine - Vista adggiuntiva 2</value> <value xml:lang="zh">å¾å - é¢å¤æ£æ¥2</value> <value xml:lang="zh_TW">åå - é¡å¤æª¢æ¥2</value> </property> + <property key="ProductContentType.description.XTRA_IMG_2_SMALL"> + <value xml:lang="en">Image - Additional View 2 Small</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 2 piccola</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_2_MEDIUM"> + <value xml:lang="en">Image - Additional View 2 Medium</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 2 media</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_2_LARGE"> + <value xml:lang="en">Image - Additional View 2 Large</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 2 grande</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_2_DETAIL"> + <value xml:lang="en">Image - Additional View 2 Detail</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 2 dettaglio</value> + </property> <property key="ProductContentType.description.ADDITIONAL_IMAGE_3"> <value xml:lang="en">Image - Additional View 3</value> <value xml:lang="it">Immagine - Vista adggiuntiva 3</value> <value xml:lang="zh">å¾å - é¢å¤æ£æ¥3</value> <value xml:lang="zh_TW">åå - é¡å¤æª¢æ¥3</value> </property> + <property key="ProductContentType.description.XTRA_IMG_3_SMALL"> + <value xml:lang="en">Image - Additional View 3 Small</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 3 piccola</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_3_MEDIUM"> + <value xml:lang="en">Image - Additional View 3 Medium</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 3 media</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_3_LARGE"> + <value xml:lang="en">Image - Additional View 3 Large</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 3 grande</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_3_DETAIL"> + <value xml:lang="en">Image - Additional View 3 Detail</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 3 dettaglio</value> + </property> <property key="ProductContentType.description.ADDITIONAL_IMAGE_4"> <value xml:lang="en">Image - Additional View 4</value> <value xml:lang="it">Immagine - Vista adggiuntiva 4</value> <value xml:lang="zh">å¾å - é¢å¤æ£æ¥4</value> <value xml:lang="zh_TW">åå - é¡å¤æª¢æ¥4</value> </property> + <property key="ProductContentType.description.XTRA_IMG_4_SMALL"> + <value xml:lang="en">Image - Additional View 4 Small</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 4 piccola</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_4_MEDIUM"> + <value xml:lang="en">Image - Additional View 4 Medium</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 4 media</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_4_LARGE"> + <value xml:lang="en">Image - Additional View 4 Large</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 4 grande</value> + </property> + <property key="ProductContentType.description.XTRA_IMG_4_DETAIL"> + <value xml:lang="en">Image - Additional View 4 Detail</value> + <value xml:lang="it">Immagine - Vista adggiuntiva 4 dettaglio</value> + </property> <property key="ProductContentType.description.ADDTOCART_IMAGE"> <value xml:lang="en">Add To Cart Image</value> <value xml:lang="it">Aggiungi immagine al carrello</value> Modified: ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml (original) +++ ofbiz/branches/jquery/applications/product/data/ProductTypeData.xml Tue Dec 7 10:42:16 2010 @@ -195,6 +195,7 @@ under the License. <ProductAssocType description="Engineering Bill of Materials" hasTable="N" parentTypeId="PRODUCT_COMPONENT" productAssocTypeId="ENGINEER_COMPONENT"/> <ProductAssocType description="Product Manufactured As" hasTable="N" parentTypeId="" productAssocTypeId="PRODUCT_MANUFACTURED"/> <ProductAssocType description="Configurable product instance" hasTable="N" parentTypeId="" productAssocTypeId="PRODUCT_CONF"/> + <ProductAssocType description="Alternative Packaging" hasTable="N" parentTypeId="" productAssocTypeId="ALTERNATIVE_PACKAGE"/> <ProductCategoryType description="Catalog" hasTable="N" parentTypeId="" productCategoryTypeId="CATALOG_CATEGORY"/> <ProductCategoryType description="Industry" hasTable="N" parentTypeId="" productCategoryTypeId="INDUSTRY_CATEGORY"/> @@ -254,6 +255,22 @@ under the License. <ProductContentType description="Image - Additional View 2" hasTable="N" parentTypeId="" productContentTypeId="ADDITIONAL_IMAGE_2"/> <ProductContentType description="Image - Additional View 3" hasTable="N" parentTypeId="" productContentTypeId="ADDITIONAL_IMAGE_3"/> <ProductContentType description="Image - Additional View 4" hasTable="N" parentTypeId="" productContentTypeId="ADDITIONAL_IMAGE_4"/> + <ProductContentType description="Image - Additional View 1 Small" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_1_SMALL"/> + <ProductContentType description="Image - Additional View 1 Medium" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_1_MEDIUM"/> + <ProductContentType description="Image - Additional View 1 Large" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_1_LARGE"/> + <ProductContentType description="Image - Additional View 1 Detail" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_1_DETAIL"/> + <ProductContentType description="Image - Additional View 2 Small" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_2_SMALL"/> + <ProductContentType description="Image - Additional View 2 Medium" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_2_MEDIUM"/> + <ProductContentType description="Image - Additional View 2 Large" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_2_LARGE"/> + <ProductContentType description="Image - Additional View 2 Detail" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_2_DETAIL"/> + <ProductContentType description="Image - Additional View 3 Small" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_3_SMALL"/> + <ProductContentType description="Image - Additional View 3 Medium" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_3_MEDIUM"/> + <ProductContentType description="Image - Additional View 3 Large" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_3_LARGE"/> + <ProductContentType description="Image - Additional View 3 Detail" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_3_DETAIL"/> + <ProductContentType description="Image - Additional View 4 Small" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_4_SMALL"/> + <ProductContentType description="Image - Additional View 4 Medium" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_4_MEDIUM"/> + <ProductContentType description="Image - Additional View 4 Large" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_4_LARGE"/> + <ProductContentType description="Image - Additional View 4 Detail" hasTable="N" parentTypeId="" productContentTypeId="XTRA_IMG_4_DETAIL"/> <ProductContentType description="Add To Cart Label" hasTable="N" parentTypeId="" productContentTypeId="ADDTOCART_LABEL"/> <ProductContentType description="Add To Cart Image" hasTable="N" parentTypeId="" productContentTypeId="ADDTOCART_IMAGE"/> <ProductContentType description="Short Sales Pitch" hasTable="N" parentTypeId="" productContentTypeId="SHORT_SALES_PITCH"/> Modified: ofbiz/branches/jquery/applications/product/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/entitydef/entitymodel.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/entitydef/entitymodel.xml (original) +++ ofbiz/branches/jquery/applications/product/entitydef/entitymodel.xml Tue Dec 7 10:42:16 2010 @@ -2375,11 +2375,13 @@ under the License. <field name="price" type="currency-precise"></field> <field name="termUomId" type="id"><description>Mainly used for recurring and usage prices to specify a time/freq measure, or a usage unit measure (bits, minutes, etc)</description></field> <field name="customPriceCalcService" type="id"><description>Points to a CustomMethod used to specify a service for the calculation of the unit price of the product (NOTE: a better name for this field might be priceCalcCustomMethodId)</description></field> - <field name="priceWithTax" type="currency-precise"/> + <field name="priceWithoutTax" type="currency-precise"><description>Always without tax if populated, regardless of if price does or does not include tax.</description></field> + <field name="priceWithTax" type="currency-precise"><description>Always with tax if populated, regardless of if price does or does not include tax.</description></field> <field name="taxAmount" type="currency-precise"/> <field name="taxPercentage" type="fixed-point"/> <field name="taxAuthPartyId" type="id-ne"/> <field name="taxAuthGeoId" type="id-ne"/> + <field name="taxInPrice" type="indicator"><description>If Y the price field has tax included for the given taxAuthPartyId/taxAuthGeoId at the taxPercentage.</description></field> <field name="createdDate" type="date-time"></field> <field name="createdByUserLogin" type="id-vlong"></field> <field name="lastModifiedDate" type="date-time"></field> Modified: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/price/PriceServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/price/PriceServices.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/price/PriceServices.xml (original) +++ ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/price/PriceServices.xml Tue Dec 7 10:42:16 2010 @@ -106,6 +106,7 @@ under the License. </condition> <then> <set field="parameters.priceWithTax" from-field="parameters.price"/> + <!-- if taxPercentage not passed in look it up based on taxAuthGeoId and taxAuthPartyId --> <if-empty field="parameters.taxPercentage"> <!-- we only have basic data to constrain by here, so assume that if it is a VAT tax setup it should be pretty simple --> @@ -127,6 +128,7 @@ under the License. <check-errors/> </if-empty> + <!-- in short the formula is: taxAmount = priceWithTax - (priceWithTax/(1+taxPercentage/100)) --> <calculate field="parameters.taxAmount" type="BigDecimal" decimal-scale="3" rounding-mode="HalfUp"> <calcop operator="subtract"> <calcop operator="get" field="parameters.priceWithTax"/> @@ -142,12 +144,23 @@ under the License. </calcop> </calcop> </calculate> - <calculate field="parameters.price" type="BigDecimal" decimal-scale="3" rounding-mode="HalfUp"> + + <calculate field="parameters.priceWithoutTax" type="BigDecimal" decimal-scale="3" rounding-mode="HalfUp"> <calcop operator="subtract"> <calcop operator="get" field="parameters.priceWithTax"/> <calcop operator="get" field="parameters.taxAmount"></calcop> </calcop> </calculate> + + <if-compare field="parameters.taxInPrice" operator="equals" value="Y"> + <!-- the price passed in has tax included, and we want to store it with tax included --> + <set field="parameters.price" from-field="parameters.priceWithTax"/> + + <else> + <!-- the price passed in has tax included, but we want to store it without tax included --> + <set field="parameters.price" from-field="parameters.priceWithoutTax"/> + </else> + </if-compare> </then> </if> </simple-method> Modified: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/product/ProductServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/product/ProductServices.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original) +++ ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/product/ProductServices.xml Tue Dec 7 10:42:16 2010 @@ -620,7 +620,7 @@ under the License. <if-empty field="productCalculatedInfo"> <!-- go ahead and create it --> <make-value value-field="productCalculatedInfo" entity-name="ProductCalculatedInfo"/> - <set from-field="parameters.productId" field="productCalculatedInfo.productId"/> + <set from-field="productId" field="productCalculatedInfo.productId"/> <set from-field="averageCustomerRating" field="productCalculatedInfo.averageCustomerRating"/> <create-value value-field="productCalculatedInfo"/> <else> Propchange: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Dec 7 10:42:16 2010 @@ -1,3 +1,3 @@ /ofbiz/branches/addbirt/applications/product/script/org/ofbiz/shipment/test/FacilityTests.xml:831210-885099,885686-886087 /ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:921280-927264 -/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-1040441 +/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-1042956 Modified: ofbiz/branches/jquery/applications/product/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/servicedef/services.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/servicedef/services.xml (original) +++ ofbiz/branches/jquery/applications/product/servicedef/services.xml Tue Dec 7 10:42:16 2010 @@ -242,12 +242,15 @@ under the License. <description> Create an ProductPrice. Price is always stored without tax. - If a taxAuthGeoId and taxAuthPartyId are (or taxAuthCombinedId is) passed in then the price will be considered a price - with tax included and the tax will be removed before storing to the database - (the priceWithTax, taxAmount, and taxPercentage fields will also be populated). + If taxAuthGeoId and taxAuthPartyId are (or taxAuthCombinedId is) passed in then the price will be considered a price + with tax included (the priceWithoutTax, priceWithTax, taxAmount, and taxPercentage fields will also be populated). + If the taxInPrice field is 'Y' then the price field will be left with the price included (price will be equal to priceWithTax), + otherwise tax will be removed from the passed in price and the price field will be equal to the priceWithoutTax field. + If taxAuthGeoId or taxAuthPartyId empty, and taxAuthCombinedId is empty, then the taxInPrice field will be ignored. </description> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"> + <exclude field-name="priceWithoutTax"/> <exclude field-name="priceWithTax"/> <exclude field-name="taxAmount"/> <exclude field-name="createdDate"/> @@ -264,6 +267,7 @@ under the License. <description>Update an ProductPrice</description> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"> + <exclude field-name="priceWithoutTax"/> <exclude field-name="priceWithTax"/> <exclude field-name="taxAmount"/> <exclude field-name="createdDate"/> Modified: ofbiz/branches/jquery/applications/product/servicedef/services_pricepromo.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/servicedef/services_pricepromo.xml?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/servicedef/services_pricepromo.xml (original) +++ ofbiz/branches/jquery/applications/product/servicedef/services_pricepromo.xml Tue Dec 7 10:42:16 2010 @@ -63,6 +63,7 @@ under the License. each Map in the List will also contain a field called "quantityProductPriceRule" with the GenericValue object representing the ProductPriceRule with the quantity condition that the List entry is based on --> </attribute> + <attribute name="optimizeForLargeRuleSet" type="String" mode="IN" optional="true"/> </service> <service name="createProductPriceRule" default-entity-name="ProductPriceRule" engine="simple" Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/image/ScaleImage.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/image/ScaleImage.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/image/ScaleImage.java Tue Dec 7 10:42:16 2010 @@ -50,6 +50,9 @@ public class ScaleImage { public static final String module = ScaleImage.class.getName(); public static final String resource = "ProductErrorUiLabels"; + /* public so that other code can easily use the imageUrlMap returned by scaleImageInAllSize */ + public static final List<String> sizeTypeList = UtilMisc.toList("small", "medium", "large", "detail"); + public ScaleImage() { } @@ -74,7 +77,6 @@ public class ScaleImage { /* VARIABLES */ Locale locale = (Locale) context.get("locale"); - List<String> sizeTypeList = UtilMisc.toList("small", "medium", "large", "detail"); int index; Map<String, Map<String, String>> imgPropertyMap = FastMap.newInstance(); BufferedImage bufImg, bufNewImg; Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/price/PriceServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/price/PriceServices.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/price/PriceServices.java Tue Dec 7 10:42:16 2010 @@ -76,8 +76,6 @@ public class PriceServices { * </ul> */ public static Map<String, Object> calculateProductPrice(DispatchContext dctx, Map<String, ? extends Object> context) { - boolean optimizeForLargeRuleSet = false; - // UtilTimer utilTimer = new UtilTimer(); // utilTimer.timerString("Starting price calc", module); // utilTimer.setLog(false); @@ -97,6 +95,7 @@ public class PriceServices { String findAllQuantityPricesStr = (String) context.get("findAllQuantityPrices"); boolean findAllQuantityPrices = "Y".equals(findAllQuantityPricesStr); + boolean optimizeForLargeRuleSet = "Y".equals(context.get("optimizeForLargeRuleSet")); String agreementId = (String) context.get("agreementId"); Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductServices.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductServices.java Tue Dec 7 10:42:16 2010 @@ -955,7 +955,6 @@ public class ProductServices { LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); - GenericValue userLogin = (GenericValue) context.get("userLogin"); String productId = (String) context.get("productId"); String productContentTypeId = (String) context.get("productContentTypeId"); ByteBuffer imageData = (ByteBuffer) context.get("uploadedFile"); @@ -1018,113 +1017,139 @@ public class ProductServices { } String imageUrl = imageUrlPrefix + "/" + filePathPrefix + filenameToUse; + /* store the imageUrl version of the image, for backwards compatibility with code that does not use scaled versions */ + Map<String, Object> result = addImageResource(dispatcher, delegator, context, imageUrl, productContentTypeId); - if (UtilValidate.isNotEmpty(imageUrl) && imageUrl.length() > 0) { - String contentId = (String) context.get("contentId"); + if( ServiceUtil.isError(result)) { + return result; + } - Map<String, Object> dataResourceCtx = FastMap.newInstance(); - dataResourceCtx.put("objectInfo", imageUrl); - dataResourceCtx.put("dataResourceName", (String) context.get("_uploadedFile_fileName")); - dataResourceCtx.put("userLogin", userLogin); + /* now store the image versions created by ScaleImage.scaleImageInAllSize */ + /* have to shrink length of productContentTypeId, as otherwise value is too long for database field */ + Map<String,String> imageUrlMap = (Map<String, String>)resultResize.get("imageUrlMap"); + for( String sizeType : ScaleImage.sizeTypeList ) { + imageUrl = imageUrlMap.get(sizeType); + if( UtilValidate.isNotEmpty(imageUrl)) { + result = addImageResource(dispatcher, delegator, context, imageUrl, "XTRA_IMG_" + viewNumber + "_" + sizeType.toUpperCase()); + if( ServiceUtil.isError(result)) { + return result; + } + } + } + } + return ServiceUtil.returnSuccess(); + } - Map<String, Object> productContentCtx = FastMap.newInstance(); - productContentCtx.put("productId", productId); - productContentCtx.put("productContentTypeId", productContentTypeId); - productContentCtx.put("fromDate", (Timestamp) context.get("fromDate")); - productContentCtx.put("thruDate", (Timestamp) context.get("thruDate")); - productContentCtx.put("userLogin", userLogin); + private static Map<String,Object> addImageResource( LocalDispatcher dispatcher, Delegator delegator, Map<String, ? extends Object> context, + String imageUrl, String productContentTypeId ) { + GenericValue userLogin = (GenericValue) context.get("userLogin"); + String productId = (String) context.get("productId"); - if (UtilValidate.isNotEmpty(contentId)) { - GenericValue content = null; + if (UtilValidate.isNotEmpty(imageUrl) && imageUrl.length() > 0) { + String contentId = (String) context.get("contentId"); + + Map<String, Object> dataResourceCtx = FastMap.newInstance(); + dataResourceCtx.put("objectInfo", imageUrl); + dataResourceCtx.put("dataResourceName", (String) context.get("_uploadedFile_fileName")); + dataResourceCtx.put("userLogin", userLogin); + + Map<String, Object> productContentCtx = FastMap.newInstance(); + productContentCtx.put("productId", productId); + productContentCtx.put("productContentTypeId", productContentTypeId); + productContentCtx.put("fromDate", (Timestamp) context.get("fromDate")); + productContentCtx.put("thruDate", (Timestamp) context.get("thruDate")); + productContentCtx.put("userLogin", userLogin); + + if (UtilValidate.isNotEmpty(contentId)) { + GenericValue content = null; + try { + content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false); + } catch (GenericEntityException e) { + Debug.logError(e, module); + return ServiceUtil.returnError(e.getMessage()); + } + + if (content != null) { + GenericValue dataResource = null; try { - content = delegator.findOne("Content", UtilMisc.toMap("contentId", contentId), false); + dataResource = content.getRelatedOne("DataResource"); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); } - if (content != null) { - GenericValue dataResource = null; + if (dataResource != null) { + dataResourceCtx.put("dataResourceId", dataResource.getString("dataResourceId")); try { - dataResource = content.getRelatedOne("DataResource"); - } catch (GenericEntityException e) { + dispatcher.runSync("updateDataResource", dataResourceCtx); + } catch (GenericServiceException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); } - - if (dataResource != null) { - dataResourceCtx.put("dataResourceId", dataResource.getString("dataResourceId")); - try { - dispatcher.runSync("updateDataResource", dataResourceCtx); - } catch (GenericServiceException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } - } else { - dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); - dataResourceCtx.put("mimeTypeId", "text/html"); - Map<String, Object> dataResourceResult = FastMap.newInstance(); - try { - dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); - } catch (GenericServiceException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } - - Map<String, Object> contentCtx = FastMap.newInstance(); - contentCtx.put("contentId", contentId); - contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); - contentCtx.put("userLogin", userLogin); - try { - dispatcher.runSync("updateContent", contentCtx); - } catch (GenericServiceException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } + } else { + dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); + dataResourceCtx.put("mimeTypeId", "text/html"); + Map<String, Object> dataResourceResult = FastMap.newInstance(); + try { + dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + return ServiceUtil.returnError(e.getMessage()); } - productContentCtx.put("contentId", contentId); + Map<String, Object> contentCtx = FastMap.newInstance(); + contentCtx.put("contentId", contentId); + contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); + contentCtx.put("userLogin", userLogin); try { - dispatcher.runSync("updateProductContent", productContentCtx); + dispatcher.runSync("updateContent", contentCtx); } catch (GenericServiceException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); } } - } else { - dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); - dataResourceCtx.put("mimeTypeId", "text/html"); - Map<String, Object> dataResourceResult = FastMap.newInstance(); - try { - dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); - } catch (GenericServiceException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } - Map<String, Object> contentCtx = FastMap.newInstance(); - contentCtx.put("contentTypeId", "DOCUMENT"); - contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); - contentCtx.put("userLogin", userLogin); - Map<String, Object> contentResult = FastMap.newInstance(); + productContentCtx.put("contentId", contentId); try { - contentResult = dispatcher.runSync("createContent", contentCtx); + dispatcher.runSync("updateProductContent", productContentCtx); } catch (GenericServiceException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); } + } + } else { + dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT"); + dataResourceCtx.put("mimeTypeId", "text/html"); + Map<String, Object> dataResourceResult = FastMap.newInstance(); + try { + dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + return ServiceUtil.returnError(e.getMessage()); + } - productContentCtx.put("contentId", contentResult.get("contentId")); - try { - dispatcher.runSync("createProductContent", productContentCtx); - } catch (GenericServiceException e) { - Debug.logError(e, module); - return ServiceUtil.returnError(e.getMessage()); - } + Map<String, Object> contentCtx = FastMap.newInstance(); + contentCtx.put("contentTypeId", "DOCUMENT"); + contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId")); + contentCtx.put("userLogin", userLogin); + Map<String, Object> contentResult = FastMap.newInstance(); + try { + contentResult = dispatcher.runSync("createContent", contentCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + return ServiceUtil.returnError(e.getMessage()); + } + + productContentCtx.put("contentId", contentResult.get("contentId")); + try { + dispatcher.runSync("createProductContent", productContentCtx); + } catch (GenericServiceException e) { + Debug.logError(e, module); + return ServiceUtil.returnError(e.getMessage()); } } } - return ServiceUtil.returnSuccess(); + return ServiceUtil.returnSuccess(); } /** Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/product/ProductWorker.java Tue Dec 7 10:42:16 2010 @@ -1124,4 +1124,18 @@ nextProd: return variantProductId; } + + public static boolean isAlternativePacking(Delegator delegator, String productId, String originalVirtualProductId) { + boolean isAlternativePacking = false; + if(productId != null && originalVirtualProductId != null){ + List<GenericValue> alternativePackingProds = null; + try { + alternativePackingProds = delegator.findByAndCache("ProductAssoc", UtilMisc.toMap("productId", originalVirtualProductId , "productIdTo", productId, "productAssocTypeId", "ALTERNATIVE_PACKAGE")); + if(UtilValidate.isNotEmpty(alternativePackingProds)) isAlternativePacking = true; + } catch (GenericEntityException e) { + Debug.logWarning(e, "Could not found alternative product: " + e.getMessage(), module); + } + } + return isAlternativePacking; + } } Modified: ofbiz/branches/jquery/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl (original) +++ ofbiz/branches/jquery/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl Tue Dec 7 10:42:16 2010 @@ -24,8 +24,16 @@ under the License. <div class="screenlet-body"> <form method="post" action="<@ofbizUrl>createBulkProductPromoCode</@ofbizUrl>" enctype="multipart/form-data"> <input type="hidden" name="productPromoId" value="${productPromoId}"/> - <span class="label">${uiLabelMap.ProductPromoUserEntered}:</span><select name="userEntered"><option>N</option><option>Y</option></select> - <span class="label">${uiLabelMap.ProductPromotionReqEmailOrParty}:</span><select name="requireEmailOrParty"><option>N</option><option>Y</option></select> + <span class="label">${uiLabelMap.ProductPromoUserEntered}:</span> + <select name="userEntered"> + <option value="Y">${uiLabelMap.CommonY}</option> + <option value="N">${uiLabelMap.CommonN}</option> + </select> + <span class="label">${uiLabelMap.ProductPromotionReqEmailOrParty}:</span> + <select name="requireEmailOrParty"> + <option value="N">${uiLabelMap.CommonN}</option> + <option value="Y">${uiLabelMap.CommonY}</option> + </select> <span class="label">${uiLabelMap.ProductPromotionUseLimits}: ${uiLabelMap.ProductPromotionPerCode}</span><input type="text" size="5" name="useLimitPerCode" /> <span class="label">${uiLabelMap.ProductPromotionPerCustomer}</span><input type="text" size="5" name="useLimitPerCustomer" /> @@ -45,8 +53,16 @@ under the License. <form method="post" action="<@ofbizUrl>createProductPromoCodeSet</@ofbizUrl>"> <input type="hidden" name="productPromoId" value="${productPromoId}"/> <span class="label">${uiLabelMap.CommonQuantity}:</span><input type="text" size="5" name="quantity" /> - <span class="label">${uiLabelMap.ProductPromoUserEntered}:</span><select name="userEntered"><option>N</option><option>Y</option></select> - <span class="label">${uiLabelMap.ProductPromotionReqEmailOrParty}:</span><select name="requireEmailOrParty"><option>N</option><option>Y</option></select> + <span class="label">${uiLabelMap.ProductPromoUserEntered}:</span> + <select name="userEntered"> + <option value="Y">${uiLabelMap.CommonY}</option> + <option value="N">${uiLabelMap.CommonN}</option> + </select> + <span class="label">${uiLabelMap.ProductPromotionReqEmailOrParty}:</span> + <select name="requireEmailOrParty"> + <option value="N">${uiLabelMap.CommonN}</option> + <option value="Y">${uiLabelMap.CommonY}</option> + </select> <span class="label">${uiLabelMap.ProductPromotionUseLimits}: ${uiLabelMap.ProductPromotionPerCode}</span><input type="text" size="5" name="useLimitPerCode" /> <span class="label">${uiLabelMap.ProductPromotionPerCustomer}</span><input type="text" size="5" name="useLimitPerCustomer" /> Modified: ofbiz/branches/jquery/applications/product/webapp/catalog/reviews/pendingReviews.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/webapp/catalog/reviews/pendingReviews.ftl?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/webapp/catalog/reviews/pendingReviews.ftl (original) +++ ofbiz/branches/jquery/applications/product/webapp/catalog/reviews/pendingReviews.ftl Tue Dec 7 10:42:16 2010 @@ -58,6 +58,7 @@ under the License. <#list pendingReviews as review> <#if review.userLoginId?has_content> <#assign postedUserLogin = review.getRelatedOne("UserLogin")> + <#if postedUserLogin.partyId?has_content> <#assign party = postedUserLogin.getRelatedOne("Party")> <#assign partyTypeId = party.get("partyTypeId")> <#if partyTypeId == "PERSON"> @@ -66,18 +67,21 @@ under the License. <#assign postedPerson = postedUserLogin.getRelatedOne("PartyGroup")> </#if> </#if> + </#if> <tr id="review_tableRow_${rowCount}" valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td> <input type="hidden" name="productReviewId_o_${rowCount}" value="${review.productReviewId}" /> ${review.postedDateTime?if_exists} </td> + <td> <#if postedPerson?has_content> <#if postedPerson.firstName?has_content && postedPerson.lastName?has_content> - <td>${postedPerson.firstName} ${postedPerson.lastName}</td> + ${postedPerson.firstName} ${postedPerson.lastName} <#else> - <td>${postedPerson.groupName}</td> + ${postedPerson.groupName} </#if> </#if> + </td> <td> <select name='postedAnonymous_o_${rowCount}'> <option>${review.postedAnonymous?default("N")}</option> Modified: ofbiz/branches/jquery/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy?rev=1042964&r1=1042963&r2=1042964&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy (original) +++ ofbiz/branches/jquery/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy Tue Dec 7 10:42:16 2010 @@ -20,10 +20,7 @@ import org.ofbiz.entity.condition.* import org.ofbiz.widget.html.HtmlFormWrapper -shipmentId = request.getParameter("shipmentId"); -if (!shipmentId) { - shipmentId = request.getAttribute("shipmentId"); -} +shipmentId = parameters.shipmentId; shipment = delegator.findOne("Shipment", [shipmentId : shipmentId], false); // orderHeader is needed here to determine type of order and hence types of shipment status @@ -34,26 +31,15 @@ if (!shipment) { } orderHeader = delegator.findOne("OrderHeader", [orderId : primaryOrderId], false); -HtmlFormWrapper editShipmentWrapper = new HtmlFormWrapper("component://product/widget/facility//ShipmentForms.xml", "EditShipment", request, response); -editShipmentWrapper.putInContext("shipmentId", shipmentId); -editShipmentWrapper.putInContext("shipment", shipment); -editShipmentWrapper.putInContext("productStoreId", null); // seems to be needed not exist != null - -if (!shipment) { - editShipmentWrapper.setUseRequestParameters(true); -} - // the kind of StatusItem to use is based on the type of order +statusItemTypeId = "SHIPMENT_STATUS"; if (orderHeader && "PURCHASE_ORDER".equals(orderHeader.orderTypeId)) { - statusItemType = "PURCH_SHIP_STATUS"; -} else { - statusItemType = "SHIPMENT_STATUS"; + statusItemTypeId = "PURCH_SHIP_STATUS"; } -editShipmentWrapper.putInContext("statusItemType", statusItemType); +context.statusItemTypeId = statusItemTypeId; context.shipmentId = shipmentId; context.shipment = shipment; -context.editShipmentWrapper = editShipmentWrapper; if (shipment) { currentStatus = shipment.getRelatedOne("StatusItem"); @@ -61,24 +47,9 @@ if (shipment) { destinationPostalAddress = shipment.getRelatedOne("DestinationPostalAddress"); originTelecomNumber = shipment.getRelatedOne("OriginTelecomNumber"); destinationTelecomNumber = shipment.getRelatedOne("DestinationTelecomNumber"); - toPerson = shipment.getRelatedOne("ToPerson"); - toPartyGroup = shipment.getRelatedOne("ToPartyGroup"); - fromPerson = shipment.getRelatedOne("FromPerson"); - fromPartyGroup = shipment.getRelatedOne("FromPartyGroup"); - primaryOrderId = shipment.getString("primaryOrderId"); - - editShipmentWrapper.putInContext("currentStatus", currentStatus); - editShipmentWrapper.putInContext("originPostalAddress", originPostalAddress); - editShipmentWrapper.putInContext("destinationPostalAddress", destinationPostalAddress); - editShipmentWrapper.putInContext("originTelecomNumber", originTelecomNumber); - editShipmentWrapper.putInContext("destinationTelecomNumber", destinationTelecomNumber); - editShipmentWrapper.putInContext("toPerson", toPerson); - editShipmentWrapper.putInContext("toPartyGroup", toPartyGroup); - editShipmentWrapper.putInContext("fromPerson", fromPerson); - editShipmentWrapper.putInContext("fromPartyGroup", fromPartyGroup); - editShipmentWrapper.putInContext("orderHeader", orderHeader); + if (orderHeader) { - editShipmentWrapper.putInContext("productStoreId", orderHeader.get("productStoreId")); + context.productStoreId = orderHeader.productStoreId; } context.currentStatus = currentStatus; @@ -86,14 +57,5 @@ if (shipment) { context.destinationPostalAddress = destinationPostalAddress; context.originTelecomNumber = originTelecomNumber; context.destinationTelecomNumber = destinationTelecomNumber; - context.toPerson = toPerson; - context.toPartyGroup = toPartyGroup; - context.fromPerson = fromPerson; - context.fromPartyGroup = fromPartyGroup; - - if (primaryOrderId) { - ord = delegator.findOne("OrderHeader", [orderId : primaryOrderId], false); - pfc = delegator.findList("ProductStoreFacility", null, null, null, null, false); - fac = delegator.findList("ProductStoreFacilityByOrder", EntityCondition.makeCondition([orderId : primaryOrderId]), null, null, null, false); - } + } |
| Free forum by Nabble | Edit this page |
