- Adding logic to createInvoicesFromShipments service to deal with creating both purchase invoices for drop shipment orders and sales invoices for the sales order linked to drop shipment orders - a sales invoice is created if the createSalesInvoicesForDropShipments parameter is true. - Adding createSalesInvoiceFromDropShipment service to wrap call to createInvoicesFromShipments, passing the createSalesInvoicesForDropShipments parameter. - Adding SECAs on updateShipment to generate a purchase invoice when a drop shipment is shipped and a sales invoice when a drop shipment is received - Adding quickDropShipOrder service, linked from orderview page, to create a drop shipment and set the shipment status to shipped and then received, in order to trigger the SECAs for drop shipment invoice generation. - Fixed flaw in createInvoiceForOrder service - now pro-rating OrderAdjustments based on OrderItem quantity from the database instead of the passed-in OrderItem, in case the OrderItem quantity has been replaced upstream. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@510664 13f79535-47bb-0310-9956-ffa450edef68
279 lines
17 KiB
XML
279 lines
17 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
|
|
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/services.xsd">
|
|
<description>Accounting Services</description>
|
|
<vendor>OFBiz</vendor>
|
|
<version>1.0</version>
|
|
|
|
|
|
<service name="getNextInvoiceId" engine="simple"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="getNextInvoiceId">
|
|
<description>Get the Next Invoice ID According to Settings on the PartyAcctgPreference Entity for the given Party</description>
|
|
<attribute name="partyId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="invoiceId" type="String" mode="OUT" optional="false"/>
|
|
</service>
|
|
|
|
<!-- Invoice services -->
|
|
<service name="createInvoice" engine="simple" default-entity-name="Invoice"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoice">
|
|
<description>Create Invoice Record</description>
|
|
<auto-attributes mode="INOUT" include="pk" optional="true"/>
|
|
<auto-attributes mode="IN" include="nonpk" optional="true"/>
|
|
<override name="invoiceTypeId" mode="IN" optional="false"/>
|
|
<override name="statusId" mode = "IN" optional="false"/>
|
|
<override name="partyIdFrom" mode = "IN" optional="false"/>
|
|
<override name="partyId" mode = "IN" optional="false"/>
|
|
</service>
|
|
<service name="copyInvoice" engine="simple" default-entity-name="Invoice"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="copyInvoice">
|
|
<description>Create Invoice Record/items from an existing invoice</description>
|
|
<auto-attributes mode="INOUT" include="pk" optional="true"/>
|
|
<attribute name="invoiceIdToCopyFrom" type="String" mode="IN" optional="false"/>
|
|
</service>
|
|
<service name="getInvoice" engine="simple" default-entity-name="Invoice"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="getInvoice">
|
|
<description>Retrieve an existing Invoice/Items</description>
|
|
<auto-attributes mode="IN" include="pk" optional="false"/>
|
|
<attribute name="invoice" type="GenericValue" mode="OUT"/>
|
|
<attribute name="invoiceItems" type="List" mode="OUT"/><!-- list of invoiceItem GenericValues -->
|
|
</service>
|
|
<service name="updateInvoice" engine="simple" default-entity-name="Invoice"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="updateInvoice">
|
|
<description>Update an existing Invoice Record</description>
|
|
<auto-attributes mode="IN" include="pk" optional="false"/>
|
|
<auto-attributes mode="IN" include="nonpk" optional="true"/>
|
|
</service>
|
|
<service name="setInvoiceStatus" engine="simple"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="setInvoiceStatus">
|
|
<description>Set the Invoice Status</description>
|
|
<attribute name="invoiceId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="statusId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="statusDate" type="Timestamp" mode="IN" optional="true"/>
|
|
<attribute name="paidDate" type="Timestamp" mode="IN" optional="true"/> <!-- only relevant for changes to PAID -->
|
|
<attribute name="oldStatusId" type="String" mode="OUT" optional="true"/>
|
|
</service>
|
|
|
|
<!--
|
|
TODO: There is a big problem with the taxableFlag. Currently, all adjustments are treated as having the same taxableFlag as
|
|
the product except when it is a sales tax. This is not very flexible. Additionally, when the invoices are computed, a
|
|
null taxableFlag is considered to be "N" when it should be "unknown". At some point we'll have to implement the adjustment.includeInTax
|
|
field properly so we don't have to rely on Product.taxable and checking by hand each type that is not taxable. The old way is already
|
|
creating an issue with return-wide adjustments: How do we know that such an adjustment is to be taxed or not? Because of this problem,
|
|
we will continue to have null taxableFlags for awhile yet, which is why the mantadory taxableFlag of this method was taken out.
|
|
-->
|
|
<service name="createInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoiceItem">
|
|
<description>Create a new Invoice Item Record</description>
|
|
<auto-attributes mode="IN" include="pk" optional="false"/>
|
|
<auto-attributes mode="IN" include="nonpk" optional="true"/>
|
|
<override name="invoiceItemSeqId" mode="INOUT" optional="true"/><!-- will optionally assign by the system -->
|
|
</service>
|
|
<service name="updateInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="updateInvoiceItem">
|
|
<description>Update existing Invoice Item Record</description>
|
|
<auto-attributes mode="IN" include="pk" optional="false"/>
|
|
<auto-attributes mode="IN" include="nonpk" optional="true"/>
|
|
</service>
|
|
<service name="removeInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="removeInvoiceItem">
|
|
<description>Remove an existing Invoice Item Record</description>
|
|
<auto-attributes mode="IN" include="pk" optional="false"/>
|
|
</service>
|
|
|
|
<service name="createInvoiceRole" engine="simple" default-entity-name="InvoiceRole"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoiceRole">
|
|
<description>Create a new Invoice Role Record</description>
|
|
<auto-attributes mode="IN" include="pk" optional="false"/>
|
|
<auto-attributes mode="IN" include="nonpk" optional="true"/>
|
|
</service>
|
|
<service name="removeInvoiceRole" engine="simple" default-entity-name="InvoiceRole"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="removeInvoiceRole">
|
|
<description>Remove an existing Invoice Role Record</description>
|
|
<auto-attributes mode="IN" include="pk" optional="false"/>
|
|
</service>
|
|
<service name="updatePaymentApplication" default-entity-name="PaymentApplication" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="updatePaymentApplication">
|
|
<description>
|
|
Apply a payment to a Invoice or other payment or Billing account or Taxauthority,
|
|
create/update paymentApplication records.
|
|
</description>
|
|
<auto-attributes mode="IN" include="pk" optional="true"/>
|
|
<auto-attributes mode="IN" include="nonpk" optional="true"/>
|
|
<attribute name="invoiceProcessing" type="String" mode="IN" optional="true"/>
|
|
<override name="paymentId" optional="false"/>
|
|
</service>
|
|
<service name="updatePaymentApplicationDef" default-entity-name="PaymentApplication" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="updatePaymentApplicationDef">
|
|
<description>
|
|
Apply a payment to a Invoice or other payment or Billing account or Taxauthority,
|
|
If no ammountApplied is supplied the system will calculate and use the maximum possible value.
|
|
</description>
|
|
<auto-attributes mode="IN" include="pk" optional="true"/>
|
|
<auto-attributes mode="IN" include="nonpk" optional="true"/>
|
|
<attribute name="invoiceProcessing" type="String" mode="IN" optional="true"/>
|
|
<override name="paymentId" optional="false"/>
|
|
</service>
|
|
<service name="removePaymentApplication" default-entity-name="PaymentApplication" engine="simple"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="removePaymentApplication">
|
|
<description>Delete a paymentApplication record.</description>
|
|
<auto-attributes mode="IN" include="pk" optional="false"/>
|
|
<auto-attributes mode="OUT" include="nonpk" optional="true"/>
|
|
</service>
|
|
<service name="createInvoiceTerm" engine="simple" default-entity-name="InvoiceTerm"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoiceTerm">
|
|
<description>Create Invoice (Item) Term Record</description>
|
|
<auto-attributes mode="OUT" include="pk" optional="false"/>
|
|
<auto-attributes mode="IN" include="nonpk" optional="true"/>
|
|
</service>
|
|
<service name="createInvoiceForOrderAllItems" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="createInvoiceForOrderAllItems">
|
|
<description>
|
|
Create an invoice from existing order using all order items
|
|
orderId = The orderId to associate the invoice with
|
|
</description>
|
|
<attribute name="orderId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="invoiceId" type="String" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="createInvoiceForOrder" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="createInvoiceForOrder">
|
|
<description>
|
|
Create an invoice from existing order
|
|
orderId = The orderId to associate the invoice with
|
|
billItems = List of ItemIssuance records to use for creating the invoice
|
|
</description>
|
|
<attribute name="orderId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="billItems" type="List" mode="IN" optional="false"/>
|
|
<attribute name="invoiceId" type="String" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="createInvoiceFromReturn" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="createInvoiceFromReturn">
|
|
<description>
|
|
Create an invoice from a return
|
|
returnId = The returnId to associate the invoice with
|
|
shipmentReceiptsToBill = List of ShipmentReceipts to use for creating the invoice
|
|
</description>
|
|
<attribute name="returnId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="shipmentReceiptsToBill" type="List" mode="IN" optional="false"/>
|
|
<attribute name="invoiceId" type="String" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="createCommissionInvoices" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="createCommissionInvoices">
|
|
<description>
|
|
Create commission invoices from an order or return invoice. It
|
|
does not create any OrderItemBilling or ReturnItemBilling entities for partial commissions. Therefore, correct value
|
|
of the amountApplied needs to be supplied.
|
|
</description>
|
|
<attribute name="invoiceId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="invoiceItemSeqId" type="String" mode="IN" optional="true"/>
|
|
<attribute name="amountApplied" type="Double" mode="IN" optional="false"/>
|
|
<attribute name="invoicesCreated" type="List" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="sampleInvoiceAffiliateCommission" engine="simple"
|
|
location="org/ofbiz/accounting/invoice/SampleCommissionServices.xml.xml" invoke="sampleCalculateAffiliateCommission" auth="true">
|
|
<description>
|
|
A sample/example service to calculate an affiliate commission (direct relationship to customer) and create
|
|
and invoice for it on behalf of the affiliate, ie an invoice from the affiliate to the company that can
|
|
then be paid by the company to balance it.
|
|
</description>
|
|
<attribute name="paymentId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="invoiceId" type="String" mode="OUT" optional="false"/>
|
|
</service>
|
|
<service name="readyInvoices" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="readyInvoices">
|
|
<description>
|
|
Sets status of each invoice in the list of invoices to INVOICE_READY.
|
|
</description>
|
|
<attribute name="invoicesCreated" type="List" mode="IN" optional="false"/>
|
|
</service>
|
|
<service name="createInvoicesFromShipment" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="createInvoicesFromShipment">
|
|
<description>
|
|
Create invoice(s) from a Shipment
|
|
All the order items associated with the shipment will be selected and
|
|
one invoice for each order in the shipment will be created.
|
|
invoicesCreated = List of invoiceIds which were created by this service
|
|
</description>
|
|
<attribute name="shipmentId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="invoicesCreated" type="List" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="createSalesInvoicesFromDropShipment" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="createSalesInvoicesFromDropShipment">
|
|
<description>
|
|
Create sales invoice(s) from a drop shipment by wrapping a call to
|
|
createInvoicesFromShipments with the createSalesInvoicesForDropShipments parameter
|
|
</description>
|
|
<attribute name="shipmentId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="invoicesCreated" type="List" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="createInvoicesFromShipments" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="createInvoicesFromShipments">
|
|
<description>
|
|
Create invoice(s) from a shipment list.
|
|
All the order items associated with the shipments will be selected and
|
|
one invoice for each order will be created (each invoice could contain
|
|
items shipped in different shipments).
|
|
If the shipments are drop shipments, the type of invoices (purchase or sales) created
|
|
will be controlled by the createSalesInvoicesForDropShipments parameter (purchase by default).
|
|
invoicesCreated = List of invoiceIds which were created by this service
|
|
</description>
|
|
<attribute name="shipmentIds" type="List" mode="IN" optional="false"/>
|
|
<attribute name="createSalesInvoicesForDropShipments" type="Boolean" mode="IN" optional="true"/>
|
|
<attribute name="invoicesCreated" type="List" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="createInvoicesFromReturnShipment" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="createInvoicesFromReturnShipment">
|
|
<description>
|
|
Create invoice(s) from a return Shipment
|
|
invoicesCreated = List of invoiceIds which were created by this service
|
|
</description>
|
|
<attribute name="shipmentId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="invoicesCreated" type="List" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="sendInvoicePerEmail" engine="simple"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="sendInvoicePerEmail">
|
|
<description>Send an invoice per email</description>
|
|
<attribute name="invoiceId" type="String" mode="IN" optional="false"/>
|
|
<attribute name="sendFrom" type="String" mode="IN" optional="false"/>
|
|
<attribute name="sendTo" type="String" mode="IN" optional="false"/>
|
|
<attribute name="sendCc" type="String" mode="IN" optional="true"/>
|
|
<attribute name="subject" type="String" mode="IN" optional="true"/>
|
|
<attribute name="bodyText" type="String" mode="IN" optional="true"/>
|
|
</service>
|
|
<service name="checkInvoicePaymentApplications" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="checkInvoicePaymentApplications">
|
|
<description>Checks to see if the payments applied to an invoice total up to the invoice total; if so sets to PAID</description>
|
|
<attribute name="invoiceId" type="String" mode="IN" optional="false"/>
|
|
</service>
|
|
<service name="createInvoiceContactMech" engine="simple"
|
|
location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoiceContactMech">
|
|
<description>Create a ContactMech for an invoice</description>
|
|
<auto-attributes entity-name="InvoiceContactMech" include="pk" mode="IN" optional="false"/>
|
|
<attribute name="contactMechId" type="String" mode="OUT" optional="true"/>
|
|
</service>
|
|
<service name="calculateInvoicedAdjustmentTotal" engine="java"
|
|
location="org.ofbiz.accounting.invoice.InvoiceServices" invoke="calculateInvoicedAdjustmentTotalBd">
|
|
<description>Calculate the previously invoiced amount for an OrderAdjustment</description>
|
|
<attribute name="orderAdjustment" type="GenericValue" mode="IN" optional="false"/>
|
|
<attribute name="invoicedTotal" type="BigDecimal" mode="OUT" optional="false"/>
|
|
</service>
|
|
</services>
|