[ 
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 via email to