[jira] Created: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

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

[jira] Created: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
Invoice Sequence Restart on Fiscal Year does not work.
------------------------------------------------------

                 Key: OFBIZ-1142
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
             Project: OFBiz
          Issue Type: Bug
          Components: accounting
    Affects Versions: SVN trunk
         Environment: Debian Linux.
            Reporter: Xavier Olivella


I've been investigating and it seems there's a bug in file:
applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.

First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
<set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>

I solved it manually but then I found that another method doesn't work:
<call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
<field field-name="nowTimestamp" type="java.sql.Timestamp"/>
<field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
<field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
<field field-name="zeroLong" type="java.lang.Number"/>
</call-class-method>

Returns a null pointer exception like this:
Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]

And I really think this method is not properly coded.

Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)

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

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

Hi Xavier,

I agree that there is at least the nowTimestamp pb there and I have commited a change in rev. I searched but did not find how to set "Restart on Fiscal Year" as "invoice sequence" method. Did you do that directly in the DB, are there any UIs ?

Thanks

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-1142:
--------------------------------------

    Assignee: Jacques Le Roux

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

Oops forgot rev. # : 558532

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Xavier Olivella edited comment on OFBIZ-1142 at 7/24/07 8:06 AM:
-----------------------------------------------------------------

This "forgot" means you found it?

Anyway, I set it up in Accounting -> companies -> admin (I'm using opentaps, but I've compared this file with SVN's one and it's exactly the same)

Thanks for your interest and happy to be useful.


 was:
This "forgot" means you found it?

Anyway, I set it up in Accounting -> companies -> admin (I'm using opentaps, but I've compared this file and it's exactly the same)

Thanks for your interest and happy to be useful.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Xavier Olivella commented on OFBIZ-1142:
----------------------------------------

This "forgot" means you found it?

Anyway, I set it up in Accounting -> companies -> admin (I'm using opentaps, but I've compared this file and it's exactly the same)

Thanks for your interest and happy to be useful.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

Forgot meant that I forgot to put the rev. # as reference. Thanks for your tip, I tried in this way but not enough hard I guess. I will have a look soon.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Xavier Olivella edited comment on OFBIZ-1142 at 7/24/07 8:53 AM:
-----------------------------------------------------------------

This "forgot" means you found it?

Anyway, I set it up in Accounting -> companies -> admin -> Organization Accounting Preferences (edited)

(I'm using opentaps, but I've compared this file with SVN's one and it's exactly the same)

Thanks for your interest and happy to be useful.


 was:
This "forgot" means you found it?

Anyway, I set it up in Accounting -> companies -> admin (I'm using opentaps, but I've compared this file with SVN's one and it's exactly the same)

Thanks for your interest and happy to be useful.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Xavier Olivella edited comment on OFBIZ-1142 at 7/24/07 8:54 AM:
-----------------------------------------------------------------

This "forgot" means you found it?

Anyway, I set it up in Accounting -> companies -> admin -> Organization Accounting Preferences (edited)

(I'm using opentaps, but I've compared InvoiceServices.xml file with SVN's one and it's exactly the same)

Thanks for your interest and happy to be useful.


 was:
This "forgot" means you found it?

Anyway, I set it up in Accounting -> companies -> admin -> Organization Accounting Preferences (edited)

(I'm using opentaps, but I've compared this file with SVN's one and it's exactly the same)

Thanks for your interest and happy to be useful.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

Xavier,

OK, but I can't see any UI to edit "Organization Accounting Preferences", did you use a loaded file  ? BTW which version of Opentaps are you using ?

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Xavier Olivella commented on OFBIZ-1142:
----------------------------------------

No, you cannot edit them once you set up. The (opentaps) manual says:

"Note that once defined, they cannot be modified there.  The system does not support changing key accounting practices such as COGS method or default currency right now.  If you've made a mistake, use [Web Tools] > [Entity Data Maintenance] to correct it."

I'm not sure if it's applicable only to opentaps or also to ofbiz, but I think so, because this settings come from ofbiz (as Si Chen reminded me in opentaps forum).

Anyway the opentaps version is 1.0.0 preview 2.

Thanks a lot.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

Xavier,

Thanks for this tip. I found the Opentaps doc. It seems that this is managed from the financials module (ok I may use webtools too). I will have a look soon...

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1142.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 4.0
                   SVN trunk

This is fixed in trunk rev. 560778, release4.0 rev. 560779

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

BTW I wonder why we do not use INVSQ_RESTARTYR in place of INVSQ_ENF_SEQ : this contains more information and personnally I prefer to re-start invoice sequencing each year. Any opinions ?

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

David E. Jones commented on OFBIZ-1142:
---------------------------------------

Different companies and different governments have different practices. The world is a crazy place with lots of crazy ideas! These are based on actual feedback for client requirements.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

Thanks for comment David,

Anyway, this is not a big deal (actually before fixing this I was even not aware it existed ;o)

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Xavier Olivella commented on OFBIZ-1142:
----------------------------------------

Jacques, thanks a lot for fixing it.

About your comment, in Spain it's really usual to restar invoice sequence each year, so I'm with you, but as David says probably in other coutries they use to do it in different ways.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1142) Invoice Sequence Restart on Fiscal Year does not work.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Xavier Olivella commented on OFBIZ-1142:
----------------------------------------

Fine, I've tested it and now it's working fine.

Thanks.

> Invoice Sequence Restart on Fiscal Year does not work.
> ------------------------------------------------------
>
>                 Key: OFBIZ-1142
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1142
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: Debian Linux.
>            Reporter: Xavier Olivella
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> I've been investigating and it seems there's a bug in file:
> applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
> The method "getNextInvoiceId" doesn't work properly when you choose "Restart on Fiscal Year" as "invoice sequence" method.
> First of all, it doesn't works fine when returning first InvoiceID, as you need to set up "lastInvoiceRestartDate" and this line is not working because "nowTimestamp" is empty.
> <set from-field="nowTimestamp" field="partyAcctgPreference.lastInvoiceRestartDate"/>
> I solved it manually but then I found that another method doesn't work:
> <call-class-method class-name="org.ofbiz.base.util.UtilDateTime" method-name="getYearStart" ret-field-name="curYearFiscalStartDate">
> <field field-name="nowTimestamp" type="java.sql.Timestamp"/>
> <field field-name="partyAcctgPreference.fiscalYearStartDay" type="java.lang.Number"/>
> <field field-name="partyAcctgPreference.fiscalYearStartMonth" type="java.lang.Number"/>
> <field field-name="zeroLong" type="java.lang.Number"/>
> </call-class-method>
> Returns a null pointer exception like this:
> Next invoiceId [file:/usr/local/test01/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml#getNextInvoiceId] process [Method to execute named getYearStart threw an exception: java.lang.NullPointerException])]
> And I really think this method is not properly coded.
> Thanks a lot.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.