[jira] [Commented] (OFBIZ-7147) Remove parentTypeId from InvoiceType data where InvoiceTypeId and parentTypeId are equal

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-7147) Remove parentTypeId from InvoiceType data where InvoiceTypeId and parentTypeId are equal

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-7147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15310127#comment-15310127 ]

Jacques Le Roux commented on OFBIZ-7147:
----------------------------------------

I got it, I was suggesting this
{code}
Index: applications/accounting/data/AccountingTypeData.xml
===================================================================
--- applications/accounting/data/AccountingTypeData.xml (revision 1746419)
+++ applications/accounting/data/AccountingTypeData.xml (working copy)
@@ -531,8 +531,9 @@
     <InvoiceItemType description="Commission Invoice Line Item" hasTable="N" invoiceItemTypeId="COMM_INV_ITEM" parentTypeId=""/>
     <InvoiceItemType description="Commission Invoice Adjustment" hasTable="N" invoiceItemTypeId="COMM_INV_ADJ" parentTypeId="INVOICE_ADJ"/>
 
-    <InvoiceType description="Purchase Invoice" hasTable="N" invoiceTypeId="PURCHASE_INVOICE" parentTypeId="PURCHASE_INVOICE"/>
-    <InvoiceType description="Sales Invoice" hasTable="N" invoiceTypeId="SALES_INVOICE" parentTypeId="SALES_INVOICE"/>
+    <InvoiceType description="Invoice" hasTable="N" invoiceTypeId="INVOICE"/>
+    <InvoiceType description="Purchase Invoice" hasTable="N" invoiceTypeId="PURCHASE_INVOICE" parentTypeId="INVOICE"/>
+    <InvoiceType description="Sales Invoice" hasTable="N" invoiceTypeId="SALES_INVOICE" parentTypeId="INVOICE"/>
     <InvoiceType description="Customer Return" hasTable="N" invoiceTypeId="CUST_RTN_INVOICE" parentTypeId="PURCHASE_INVOICE"/>
     <InvoiceType description="Purchase Return" hasTable="N" invoiceTypeId="PURC_RTN_INVOICE" parentTypeId="SALES_INVOICE"/>
     <InvoiceType description="Commission" hasTable="N" invoiceTypeId="COMMISSION_INVOICE" parentTypeId="PURCHASE_INVOICE"/>
{code}
I did not measure the consequences, should not be a problem though. I must say it's pure intellectualism, I agree no parent type as it was before works also

> Remove parentTypeId from InvoiceType data where InvoiceTypeId and parentTypeId are equal
> ----------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-7147
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7147
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12
>            Reporter: Arun Patidar
>            Assignee: Arun Patidar
>         Attachments: OFBIZ-7147.patch
>
>
> In InvoiceType data, we have invoiceTypeId value with same parentTypeId.
> Please refer AccountingTypeData.xml.
> <InvoiceType description="Purchase Invoice" hasTable="N" invoiceTypeId="PURCHASE_INVOICE"  parentTypeId="PURCHASE_INVOICE"/>
> <InvoiceType description="Sales Invoice" hasTable="N" invoiceTypeId="SALES_INVOICE" parentTypeId="SALES_INVOICE"/>
> Here, invoiceTypeId="PURCHASE_INVOICE"  has "PURCHASE_INVOICE" as its parentTypeId. Same applies for invoiceTypeId="SALES_INVOICE"
> This also causes issue of infinite loop with EntityTypeUtil.hasParentType() method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)