[OFBiz] SVN: r6925 - trunk/applications/accounting/webapp/accounting/invoice
David E. Jones
jonesde at ofbiz.org
Mon Mar 6 11:44:49 CST 2006
Si/Hans,
It was actually intentional to allow tracking of the received and
sent statuses for both purchase and sales invoices.
For example: you have a purchase invoice that you have sent and they
have told you they received it; it isn't yet paid, but you want to
track that you have verified the receipt of the invoice...
-David
On Mar 6, 2006, at 10:32 AM, sichen at svn.ofbiz.org wrote:
> Author: sichen
> Date: 2006-03-06 11:32:30 -0600 (Mon, 06 Mar 2006)
> New Revision: 6925
>
> Modified:
> trunk/applications/accounting/webapp/accounting/invoice/
> InvoiceForms.xml
> trunk/applications/accounting/webapp/accounting/invoice/
> InvoiceTabBar.ftl
> Log:
> Fixes following issues:
> 1. Avoid updating non-existing invoiceId when createInvoice fails
> 2. Change of status from a purchase invoice to 'received' not
> possible.
> 3. Disabled the update of the invoicetype (sales/purchase)
> otherwise status
> clashes can occur at update time because they can be different:
> "received"
> versus "sent"
> Thanks to Hans Bakker.
>
>
> Modified: trunk/applications/accounting/webapp/accounting/invoice/
> InvoiceForms.xml
> ===================================================================
> --- trunk/applications/accounting/webapp/accounting/invoice/
> InvoiceForms.xml 2006-03-06 17:30:01 UTC (rev 6924)
> +++ trunk/applications/accounting/webapp/accounting/invoice/
> InvoiceForms.xml 2006-03-06 17:32:30 UTC (rev 6925)
> @@ -179,26 +179,20 @@
> <form name="EditInvoice" type="single"
> target="updateInvoice" title="Edit Invoice Header" default-
> map-name="invoice"
> default-title-style="tableheadtext" default-widget-
> style="inputBox" default-tooltip-style="tabletext">
> - <alt-target use-when="invoiceId==null"
> target="createInvoice"/>
> + <alt-target use-when="invoice==null" target="createInvoice"/>
> <field name="invoiceId"><hidden/></field>
> <field position="1" name="invoiceDate" title="$
> {uiLabelMap.AccountingInvoiceDate}"><date-time/></field>
> <field position="2" name="dueDate" title="$
> {uiLabelMap.AccountingDueDate}"><date-time/></field>
> - <field position="1" name="invoiceTypeId">
> - <drop-down allow-empty="false" no-current-selected-
> key="SALES_INVOICE">
> + <field position="1" name="invoiceTypeId" use-when="invoice!
> =null"><display/></field>
> + <field position="1" name="invoiceTypeId" use-
> when="invoice==null">
> + <drop-down allow-empty="false" no-current-selected-
> key="SALES_INVOICE">
> <entity-options description="${description}"
> entity-name="InvoiceType">
> <entity-order-by field-name="description"/>
> </entity-options>
> </drop-down>
> </field>
> - <field name="statusId" use-when="invoiceId==null"><hidden
> value="INVOICE_IN_PROCESS"/></field>
> - <field position="2" name="statusId" use-when="invoiceId!
> =null"><display-entity entity-name="StatusItem"/></field>
> - <!--field position="2" name="statusId">
> - <drop-down allow-empty="false" no-current-selected-
> key="INVOICE_IN_PROCESS">
> - <entity-options description="${description}"
> entity-name="StatusItem">
> - <entity-constraint name="statusTypeId"
> operator="equals" value="INVOICE_STATUS"/>
> - </entity-options>
> - </drop-down>
> - </field-->
> + <field name="statusId" use-when="invoice==null"><hidden
> value="INVOICE_IN_PROCESS"/></field>
> + <field position="2" name="statusId" use-when="invoice!
> =null"><display-entity entity-name="StatusItem"/></field>
> <field position="1" name="description"><text size="100"/></
> field>
> <field position="1" name="partyIdFrom" title="Party billed
> from"><lookup target-form-name="LookupPartyName"/></field>
> <field position="2" name="partyId" title="Party billed
> to"><lookup target-form-name="LookupPartyName"/></field>
> @@ -209,7 +203,7 @@
> </entity-options>
> </drop-down>
> </field>
> - <field position="1" name="billingAccountId" title="$
> {uiLabelMap.AccountingBillingAccount}"><lookup target-form-
> name="LookupBillingAccount"/></field>
> + <field position="2" name="billingAccountId" title="$
> {uiLabelMap.AccountingBillingAccount}"><lookup target-form-
> name="LookupBillingAccount"/></field>
> <field position="1" name="currencyUomId" title="$
> {uiLabelMap.CommonCurrencyUom}">
> <drop-down allow-empty="true">
> <entity-options key-field-name="uomId"
> description="${abbreviation} - ${description}" entity-name="Uom">
> @@ -220,10 +214,10 @@
> </field>
> <field position="1" name="invoiceMessage"><text size="100"/
> ></field>
> <!--field position="2" name="invoiceAmount" title="Total
> Amount" use-when="invoiceId!=null"><display/></field-->
> - <field position="1" use-when="invoiceId==null"
> name="submitButton" title="Create" widget-style="smallSubmit">
> + <field position="1" use-when="invoice==null"
> name="submitButton" title="Create" widget-style="smallSubmit">
> <submit button-type="button"/>
> </field>
> - <field position="1" use-when="invoiceId!=null"
> name="submitButton" title="Update" widget-style="smallSubmit">
> + <field position="1" use-when="invoice!=null"
> name="submitButton" title="Update" widget-style="smallSubmit">
> <submit button-type="button"/>
> </field>
> </form>
>
> Modified: trunk/applications/accounting/webapp/accounting/invoice/
> InvoiceTabBar.ftl
> ===================================================================
> --- trunk/applications/accounting/webapp/accounting/invoice/
> InvoiceTabBar.ftl 2006-03-06 17:30:01 UTC (rev 6924)
> +++ trunk/applications/accounting/webapp/accounting/invoice/
> InvoiceTabBar.ftl 2006-03-06 17:32:30 UTC (rev 6925)
> @@ -41,9 +41,12 @@
> <a href="<@ofbizUrl>editInvoice</@ofbizUrl>" class="buttontext">$
> {uiLabelMap.CommonCreateNew}</a>
> <a href="<@ofbizUrl>copyInvoice?invoiceIdToCopyFrom=${invoiceId}</
> @ofbizUrl>" class="buttontext">${uiLabelMap.CommonCopy}</a>
> <a href="<@ofbizUrl>invoice.pdf?invoiceId=${invoice.invoiceId}</
> @ofbizUrl>" class="buttontext" target="_blank">$
> {uiLabelMap.AccountingInvoicePDF}</a>
> -<#if invoice.statusId == "INVOICE_IN_PROCESS">
> +<#if invoice.statusId == "INVOICE_IN_PROCESS" &&
> invoice.invoiceTypeId == "SALES_INVOICE">
> <a href="<@ofbizUrl>setInvoiceStatus?invoiceId=$
> {invoice.invoiceId}&statusId=INVOICE_READY</@ofbizUrl>"
> class="buttontext">Status to 'Ready'</a>
> </#if>
> +<#if invoice.statusId == "INVOICE_IN_PROCESS" &&
> invoice.invoiceTypeId == "PURCHASE_INVOICE">
> + <a href="<@ofbizUrl>setInvoiceStatus?invoiceId=$
> {invoice.invoiceId}&statusId=INVOICE_RECEIVED</@ofbizUrl>"
> class="buttontext">Status to 'Received'</a>
> +</#if>
> <#if invoice.statusId == "INVOICE_READY" && invoice.invoiceTypeId
> == "SALES_INVOICE">
> <a href="<@ofbizUrl>setInvoiceStatus?invoiceId=$
> {invoice.invoiceId}&statusId=INVOICE_SENT</@ofbizUrl>"
> class="buttontext">Status to 'Send'</a>
> </#if>
>
>
> _______________________________________________
> Svn mailing list
> Svn at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/svn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2466 bytes
Desc: not available
Url : http://lists.ofbiz.org/pipermail/svn/attachments/20060306/d8a827de/smime-0001.bin
More information about the Svn
mailing list