Author: apatel
Date: Wed Nov 28 16:15:05 2007 New Revision: 599219 URL: http://svn.apache.org/viewvc?rev=599219&view=rev Log: Ashish, thanks for contribution. Implementation of New entity, CRUD services and screen to map, for an organization, a productCategoryId/glAccountTypeId pair to a glAccountId Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml ofbiz/trunk/applications/accounting/widget/Menus.xml ofbiz/trunk/applications/product/config/ProductUiLabels.properties ofbiz/trunk/applications/product/entitydef/entitygroup.xml ofbiz/trunk/applications/product/entitydef/entitymodel.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml ofbiz/trunk/applications/product/servicedef/services.xml Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Wed Nov 28 16:15:05 2007 @@ -57,6 +57,7 @@ AccountingAssignPaymentToInvoice=Assign Payment to This Invoice AccountingAddNewCreditCard=Add New Credit Card AccountingAddNewEftAccount=Add New EFT Account +AccountingAddCategoryGlAccount = Add Category GL Account AccountingAgreementAvailable=List Available Agreements AccountingAgreement=Agreement AccountingAgreementDate=Agreement Date @@ -374,6 +375,7 @@ AccountingPrintChecks=Checks to Print AccountingPrintChecksPermissionError=Security Error: to print checks, you must have the ACCOUNTING_PRINT_CHECKS permission AccountingProduct=Product +AccountingProductCategoryGlAccount=Product Category Gl Account AccountingProductGlAccount=Product GL Accounts AccountingProductId=Product Id AccountingProductRates=Product Rates Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Wed Nov 28 16:15:05 2007 @@ -1284,6 +1284,34 @@ <response name="error" type="view" value="EditProductGlAccounts"/> </request-map> + <!--request-uri ProductCategoryGlAccount --> + + <request-map uri="editProductCategoryGlAccounts"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditProductCategoryGlAccounts"/> + </request-map> + + <request-map uri="createProductCategoryGlAccount"> + <security https="true" auth="true"/> + <event type="service" invoke="createProductCategoryGlAccount"/> + <response name="success" type="view" value="EditProductCategoryGlAccounts"/> + <response name="error" type="view" value="EditProductCategoryGlAccounts"/> + </request-map> + + <request-map uri="updateProductCategoryGlAccount"> + <security https="true" auth="true"/> + <event type="service" invoke="updateProductCategoryGlAccount"/> + <response name="success" type="view" value="EditProductCategoryGlAccounts"/> + <response name="error" type="view" value="EditProductCategoryGlAccounts"/> + </request-map> + + <request-map uri="deleteProductCategoryGlAccount"> + <security https="true" auth="true"/> + <event type="service" invoke="deleteProductCategoryGlAccount"/> + <response name="success" type="view" value="EditProductCategoryGlAccounts"/> + <response name="error" type="view" value="EditProductCategoryGlAccounts"/> + </request-map> + <!-- Actually reconcile account --> <request-map uri="reconcileGlAccount"> <security https="true" auth="true"/> @@ -1632,6 +1660,7 @@ <view-map name="GlAccountTypePaymentType" type="screen" page="component://accounting/widget/GlSetupScreens.xml#GlAccountTypePaymentType"/> <view-map name="GlAccountNrPaymentMethod" type="screen" page="component://accounting/widget/GlSetupScreens.xml#GlAccountNrPaymentMethod"/> <view-map name="EditProductGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditProductGlAccounts"/> + <view-map name="EditProductCategoryGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditProductCategoryGlAccounts"/> <!-- Manual Credit Card Transaction --> <view-map name="FindGatewayResponses" page="component://accounting/widget/TransactionScreens.xml#FindGatewayResponses" type="screen"/> Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Wed Nov 28 16:15:05 2007 @@ -549,4 +549,37 @@ <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> </form> + <form name="ListProductCategoryGlAccounts" type="list" target="updateProductCategoryGlAccount" list-name="productCategoryGlAccounts"> + <auto-fields-service service-name="updateProductCategoryGlAccount" default-field-type="display"/> + <field name="organizationPartyId"><hidden/></field> + <field name="glAccountTypeId"><display-entity entity-name="GlAccountType"/></field> + <field name="glAccountId" title="${uiLabelMap.ProductGlAccount}"> + <drop-down allow-empty="false"> + <list-options key-name="accountCode" list-name="glAccounts" description="${accountCode} ${accountName}"/> + </drop-down> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink target="deleteProductCategoryGlAccount?organizationPartyId=${organizationPartyId}&productCategoryId=${productCategoryId}&glAccountTypeId=${glAccountTypeId}" description="${uiLabelMap.CommonRemove}"/> + </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + + <form name="AddProductCategoryGlAccount" type="single" target="createProductCategoryGlAccount"> + <field name="organizationPartyId"><hidden/></field> + <field name="glAccountTypeId" title="${uiLabelMap.ProductAccountType}"> + <drop-down allow-empty="false"> + <list-options key-name="glAccountTypeId" list-name="productGlAccountTypes" description="${description}"/> + </drop-down> + </field> + <field name="glAccountId" title="${uiLabelMap.ProductGlAccount}"> + <drop-down allow-empty="false"> + <list-options key-name="accountCode" list-name="glAccounts" description="${accountCode} ${accountName}"/> + </drop-down> + </field> + <field name="productCategoryId" title="${uiLabelMap.ProductProductCategoryId}"> + <lookup target-form-name="LookupProductCategory"/> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> + </form> + </forms> Modified: ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlSetupScreens.xml Wed Nov 28 16:15:05 2007 @@ -366,4 +366,43 @@ </section> </screen> + <screen name="EditProductCategoryGlAccounts"> + <section> + <actions> + <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> + <set field="titleProperty" value="AccountingProductCategoryGlAccount"/> + <set field="labelTitleProperty" value="${uiLabelMap.AccountingProductCategoryGlAccount}"/> + <set field="tabButtonItem" value="GlAccountAssignment"/> + <set field="tabButtonItem2" value="ProductCategoryGlAccounts"/> + <set field="organizationPartyId" from-field="parameters.organizationPartyId" /> + + <entity-condition entity-name="ProductCategoryGlAccount" list-name="productCategoryGlAccounts"> + <condition-expr field-name="organizationPartyId" env-name="organizationPartyId"/> + <order-by field-name="glAccountTypeId"/> + </entity-condition> + <entity-condition entity-name="GlAccountType" list-name="productGlAccountTypes" use-cache="true"> + <order-by field-name="description"/> + </entity-condition> + <entity-condition entity-name="GlAccountOrganizationAndClass" list-name="glAccounts" use-cache="true"> + <condition-expr field-name="organizationPartyId" env-name="organizationPartyId"/> + <order-by field-name="accountCode"/> + </entity-condition> + </actions> + <widgets> + <decorator-screen name="CommonAdminDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <container> + <include-form name="ListProductCategoryGlAccounts" location="component://accounting/widget/GlSetupForms.xml"/> + <container> + <label style="head2">${uiLabelMap.ProductAddCategoryGlAccount}</label> + </container> + <include-form name="AddProductCategoryGlAccount" location="component://accounting/widget/GlSetupForms.xml"/> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + </screens> Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/Menus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/Menus.xml Wed Nov 28 16:15:05 2007 @@ -457,6 +457,9 @@ <menu-item name="ProductGlAccounts" title="${uiLabelMap.AccountingProductGlAccount}"> <link target="editProductGlAccounts?organizationPartyId=${organizationPartyId}"/> </menu-item> + <menu-item name="ProductCategoryGlAccounts" title="${uiLabelMap.AccountingProductCategoryGlAccount}"> + <link target="editProductCategoryGlAccounts?organizationPartyId=${organizationPartyId}"/> + </menu-item> <menu-item name="FinAccountTypeGlAccounts" title="${uiLabelMap.AccountingFinAccountTypeGlAccount}"> <link target="editFinAccountTypeGlAccounts?organizationPartyId=${organizationPartyId}"/> </menu-item> Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Wed Nov 28 16:15:05 2007 @@ -256,6 +256,7 @@ ProductActualTransport=Actual Transport ProductAddCatalogProdCat=Add a Category to this Catalog (select Category and Type, then enter optional From Date) ProductAddCatalogProductCategory=Add a Catalog to this Category (select Catalog and Type, then enter optional From Date) +ProductAddCategoryGlAccount=Add Category GL Account ProductAddContentCategory=Add Content to Category ProductAddContentProduct=Add Content to Product ProductAddContentProductConfigItem=Add Content to Product Config Item Modified: ofbiz/trunk/applications/product/entitydef/entitygroup.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitygroup.xml?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/product/entitydef/entitygroup.xml (original) +++ ofbiz/trunk/applications/product/entitydef/entitygroup.xml Wed Nov 28 16:15:05 2007 @@ -168,6 +168,7 @@ <entity-group group="org.ofbiz" entity="ProductContentType" /> <entity-group group="org.ofbiz" entity="ProductGeo" /> <entity-group group="org.ofbiz" entity="ProductGlAccount" /> + <entity-group group="org.ofbiz" entity="ProductCategoryGlAccount" /> <entity-group group="org.ofbiz" entity="ProductInventoryItem" /> <entity-group group="org.ofbiz" entity="ProductKeyword" /> <entity-group group="org.ofbiz" entity="OldProductKeywordResult" /> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Wed Nov 28 16:15:05 2007 @@ -2371,6 +2371,29 @@ <key-map field-name="glAccountId"/> </relation> </entity> + <entity entity-name="ProductCategoryGlAccount" + package-name="org.ofbiz.product.product" + title="Product Category GlAccount Entity"> + <field name="productCategoryId" type="id-ne"></field> + <field name="organizationPartyId" type="id-ne"></field> + <field name="glAccountTypeId" type="id-ne"></field> + <field name="glAccountId" type="id-ne"></field> + <prim-key field="productCategoryId"/> + <prim-key field="organizationPartyId"/> + <prim-key field="glAccountTypeId"/> + <relation type="one" fk-name="PROD_CAT_GLACT_PROD" rel-entity-name="ProductCategory"> + <key-map field-name="productCategoryId"/> + </relation> + <relation type="one" fk-name="PROD_CAT_GLACT_PARTY" rel-entity-name="Party"> + <key-map field-name="organizationPartyId" rel-field-name="partyId"/> + </relation> + <relation type="one" fk-name="PROD_CAT_GLACT_TYPE" rel-entity-name="GlAccountType"> + <key-map field-name="glAccountTypeId"/> + </relation> + <relation type="one" fk-name="PROD_CAT_GLACT_GLACT" rel-entity-name="GlAccount"> + <key-map field-name="glAccountId"/> + </relation> + </entity> <view-entity entity-name="ProductInventoryItem" package-name="org.ofbiz.product.product" title="View entity joining Product and InventoryItem to allow queries for InventoryItem based on product attributes"> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml Wed Nov 28 16:15:05 2007 @@ -956,5 +956,38 @@ <set-pk-fields value-name="lookedUpValue" map-name="parameters"/> <remove-value value-name="lookedUpValue"/> </simple-method> + + <!-- ProductCategoryGlAccount methods --> + <simple-method method-name="createProductCategoryGlAccount" short-description="Create an ProductCategoryGlAccount"> + <set value="createProductCategoryGlAccount" field="callingMethodName"/> + <set value="CREATE" field="checkAction"/> + <call-simple-method method-name="checkProductRelatedPermission"/> + <check-errors/> + <make-value value-name="newEntity" entity-name="ProductCategoryGlAccount"/> + <set-nonpk-fields map-name="parameters" value-name="newEntity"/> + <set-pk-fields map-name="parameters" value-name="newEntity"/> + <create-value value-name="newEntity"/> + </simple-method> + + <simple-method method-name="updateProductCategoryGlAccount" short-description="Update an ProductCategoryGlAccount"> + <set value="updateProductCategoryGlAccount" field="callingMethodName"/> + <set value="UPDATE" field="checkAction"/> + <call-simple-method method-name="checkProductRelatedPermission"/> + <check-errors/> + + <entity-one entity-name="ProductCategoryGlAccount" value-name="lookedUpValue"/> + <set-nonpk-fields value-name="lookedUpValue" map-name="parameters"/> + <store-value value-name="lookedUpValue"/> + </simple-method> + + <simple-method method-name="deleteProductCategoryGlAccount" short-description="Delete an ProductCategoryGlAccount"> + <set value="deleteProductCategoryGlAccount" field="callingMethodName"/> + <set value="DELETE" field="checkAction"/> + <call-simple-method method-name="checkProductRelatedPermission"/> + <check-errors/> + + <entity-one entity-name="ProductCategoryGlAccount" value-name="lookedUpValue"/> + <remove-value value-name="lookedUpValue"/> + </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/product/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services.xml?rev=599219&r1=599218&r2=599219&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services.xml Wed Nov 28 16:15:05 2007 @@ -1189,4 +1189,23 @@ location="org/ofbiz/product/product/ProductServices.xml" invoke="deleteVendorProduct" auth="true"> <auto-attributes include="pk" mode="IN" optional="false"/> </service> + + <!-- ProductCategoryGlAccount Services --> + <service name="createProductCategoryGlAccount" default-entity-name="ProductCategoryGlAccount" engine="simple" + location="org/ofbiz/product/product/ProductServices.xml" invoke="createProductCategoryGlAccount" auth="true"> + <description>Create a ProductCategoryGlAccount</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="false"/> + </service> + <service name="updateProductCategoryGlAccount" default-entity-name="ProductCategoryGlAccount" engine="simple" + location="org/ofbiz/product/product/ProductServices.xml" invoke="updateProductCategoryGlAccount" auth="true"> + <description>Update a ProductCategoryGlAccount</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="false"/> + </service> + <service name="deleteProductCategoryGlAccount" default-entity-name="ProductCategoryGlAccount" engine="simple" + location="org/ofbiz/product/product/ProductServices.xml" invoke="deleteProductCategoryGlAccount" auth="true"> + <description>Delete a ProductCategoryGlAccount</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + </service> </services> |
Free forum by Nabble | Edit this page |