[OFBiz] SVN: r5942 - in trunk/specialized/opentravelsystem: .
script/org/ofbiz/opentravelsystem
src/org/ofbiz/opentravelsystem webapp/hotelbackend/WEB-INF
webapp/hotelbackend/accounting webapp/hotelbackend/screens
hansbak at svn.ofbiz.org
hansbak at svn.ofbiz.org
Sun Oct 9 22:59:07 EDT 2005
Author: hansbak
Date: 2005-10-09 21:56:14 -0500 (Sun, 09 Oct 2005)
New Revision: 5942
Modified:
trunk/specialized/opentravelsystem/ofbiz-component.xml
trunk/specialized/opentravelsystem/script/org/ofbiz/opentravelsystem/Utilities.xml
trunk/specialized/opentravelsystem/src/org/ofbiz/opentravelsystem/mt940.java
trunk/specialized/opentravelsystem/webapp/hotelbackend/WEB-INF/controller.xml
trunk/specialized/opentravelsystem/webapp/hotelbackend/accounting/appheaderAccounting.ftl
trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/AccountingForms.xml
trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml
trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/CommonScreens.xml
trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/MainScreens.xml
Log:
more integration and test of the new accounting component in the opentravelsystem (webapp HotelBackend) now with added utilities: 1: upload bank statements into the payment and party table, 2: creation of invoices from payments with payment applications. 3: post the data into the ledger for all invoices and payments.
Modified: trunk/specialized/opentravelsystem/ofbiz-component.xml
===================================================================
--- trunk/specialized/opentravelsystem/ofbiz-component.xml 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/ofbiz-component.xml 2005-10-10 02:56:14 UTC (rev 5942)
@@ -44,6 +44,7 @@
<entity-resource type="data" reader-name="demo" loader="main" location="webapp/hotelfrontend/data/HotelDemoStore.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="webapp/HaagscheSuites/data/HaagscheSuites.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="webapp/HotelSimple/data/HotelSimple.xml"/>
+ <entity-resource type="data" reader-name="demo" loader="main" location="webapp/anet/data/anet.xml"/>
<!-- service resources: model(s), eca(s) and group definitions -->
<service-resource type="model" loader="main" location="servicedef/services.xml"/>
@@ -96,5 +97,12 @@
location="webapp/HotelSimple"
mount-point="/HotelSimple"
app-bar-display="false"/>
+
+ <webapp name="anet"
+ title="A-NeT Internet Services"
+ server="default-server"
+ location="webapp/anet"
+ mount-point="/anet"
+ app-bar-display="false"/>
</ofbiz-component>
Modified: trunk/specialized/opentravelsystem/script/org/ofbiz/opentravelsystem/Utilities.xml
===================================================================
--- trunk/specialized/opentravelsystem/script/org/ofbiz/opentravelsystem/Utilities.xml 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/script/org/ofbiz/opentravelsystem/Utilities.xml 2005-10-10 02:56:14 UTC (rev 5942)
@@ -24,94 +24,239 @@
-->
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd">
+ xsi:noNamespaceSchemaLocation="file:/home/hans/ofbiz/framework/minilang/dtd/simple-methods.xsd">
<!-- ================================================================ -->
<!-- Opentravelsystem Utilities -->
<!-- ================================================================ -->
<!-- create an invoice from a payment and apply the payment -->
- <simple-method method-name="CreateInvoicesFromPayments"
- short-description="--Create an Invoice header and detail records from a payment">
+ <simple-method method-name="CreateInvoicesFromPayments" short-description="--Create an Invoice header and detail records from a payment">
<!--check-permission permission="CATALOG" action="_CREATE">
<alt-permission permission="CATALOG_ROLE" action="_CREATE"/>
<fail-message message="Security Error: to update you need CATALOG_CREATE or CATALOG_ADMIN permission, or the limited CATALOG_ROLE_CREATE permission"/>
</check-permission>
<check-errors/-->
-
<entity-condition entity-name="Payment" list-name="payments">
<condition-list combine="or">
- <condition-expr field-name="partyIdFrom" operator="equals" value="Company"/>
- <condition-expr field-name="partyIdTo" operator="equals" value="Company"/>
+ <condition-expr field-name="partyIdFrom" operator="equals" value="${parameters.organizationPartyId}"/>
+ <condition-expr field-name="partyIdTo" operator="equals" value="${parameters.organizationPartyId}"/>
</condition-list>
</entity-condition>
<calculate field-name="invoicesCreated"><number value="0"/></calculate>
+ <calculate field-name="commitStart"><number value="0"/></calculate>
+ <transaction-begin/>
<iterate entry-name="payment" list-name="payments">
<!-- only select payments which do not have been (partly) applied -->
<get-related value-name="payment" relation-name="PaymentApplication" list-name="paymentApplications"/>
<if-empty field-name="paymentApplications">
<!-- create invoice header -->
- <field-to-field field-name="payment.partyIdFrom" to-field-name="invoice.partyId"/>
- <field-to-field field-name="payment.partyIdTo" to-field-name="invoice.partyIdFrom"/>
- <field-to-field field-name="payment.currencyUomId" to-field-name="invoice.currencyUomId"/>
- <field-to-field field-name="payment.effectiveDate" to-field-name="invoice.invoiceDate"/>
- <field-to-field field-name="payment.effectiveDate" to-field-name="invoice.dueDate"/>
- <string-to-field string="Generated from Payment ${payment.paymentId}" field-name="invoice.description"/>
- <string-to-field string="INVOICE_IN_PROCESS" field-name="invoice.statusId"/>
- <if-compare field-name="payment.partyIdFrom" operator="equals" value="Company">
- <string-to-field string="PURCHASE_INVOICE" field-name="invoice.invoiceTypeId"/>
+ <set from-field="payment.partyIdFrom" field="invoice.partyId"/>
+ <set from-field="payment.partyIdTo" field="invoice.partyIdFrom"/>
+ <set from-field="payment.currencyUomId" field="invoice.currencyUomId"/>
+ <set from-field="payment.effectiveDate" field="invoice.invoiceDate"/>
+ <set from-field="payment.effectiveDate" field="invoice.dueDate"/>
+ <set value="Generated from Payment ${payment.paymentId}" field="invoice.description"/>
+ <set value="INVOICE_IN_PROCESS" field="invoice.statusId"/>
+ <if-compare field-name="payment.partyIdFrom" operator="equals" value="${parameters.organizationPartyId}">
+ <set value="PURCHASE_INVOICE" field="invoice.invoiceTypeId"/>
<else>
- <string-to-field string="SALES_INVOICE" field-name="invoice.invoiceTypeId"/>
+ <set value="SALES_INVOICE" field="invoice.invoiceTypeId"/>
</else>
</if-compare>
- <sequenced-id-to-env sequence-name="InvoiceId" env-name="InvoiceId"/>
- <env-to-field env-name="InvoiceId" field-name="invoiceId" map-name="invoice"/>
- <call-service service-name="createInvoice" in-map-name="invoice"/>
+ <call-service service-name="createInvoice" in-map-name="invoice">
+ <result-to-field result-name="invoiceId" field-name="invoiceId"/>
+ </call-service>
+
<calculate field-name="invoicesCreated">
<calcop operator="add">
<calcop operator="get" field-name="invoicesCreated"/>
<number value="1"/>
</calcop>
</calculate>
-
- <!-- first invoiceItem -->
- <env-to-field env-name="InvoiceId" field-name="invoiceId" map-name="invoiceItem"/>
- <string-to-field string="Y" field-name="invoiceItem.taxableFlag"/>
- <calculate field-name="invoiceItem.amount" rounding-mode="HalfUp" >
- <calcop operator="divide">
- <calcop operator="multiply">
- <calcop operator="get" field-name="payment.amount"/>
- <number value="100"/>
+ <calculate field-name="commit">
+ <calcop operator="subtract">
+ <calcop operator="get" field-name="invoicesCreated"/>
+ <calcop operator="get" field-name="commitStart"/>
</calcop>
- <number value="119"/>
- </calcop>
</calculate>
- <string-to-field string="PINV_SPROD_ITEM" field-name="invoiceItem.invoiceItemTypeId"/>
- <string-to-field string="Amount ex. VAT" field-name="invoiceItem.description"/>
- <call-service service-name="createInvoiceItem" in-map-name="invoiceItem"/>
+ <log level="always" message="==========================counter: ${commit} ---- ${invoicesCreated}"></log>
+ <if-compare field-name="commit" operator="greater" value="10" format="int">
+ <log level="always" message="+++++++++++++++++++++++committing work: ${commit} "></log>
+ <set field="commitStart" from-field="commit"/>
+ <transaction-commit/>
+ <transaction-begin/>
+ </if-compare>
- <!-- second record: create VAT record -->
- <calculate field-name="invoiceItem.amount" rounding-mode="HalfUp" >
- <calcop operator="divide">
- <calcop operator="multiply">
- <calcop operator="get" field-name="payment.amount"/>
- <number value="19"/>
- </calcop>
- <number value="119"/>
- </calcop>
- </calculate>
- <string-to-field string="ITM_SALES_TAX" field-name="invoiceItem.invoiceItemTypeId"/>
- <string-to-field string="VAT 19%" field-name="invoiceItem.description"/>
- <call-service service-name="createInvoiceItem" in-map-name="invoiceItem"/>
+ <!-- check if party does not need a sales tax -->
+ <make-value value-name="partyTaxInfo" entity-name="PartyTaxInfo"/>
+ <set field="partyTaxInfo.partyId" from-field="payment.partyIdTo"/>
+ <set field="partyTaxInfo.geoId" value="NLD"/>
+ <find-by-and entity-name="PartyTaxInfo" map-name="partyTaxInfo" list-name="partyTaxInfos"/>
+ <filter-list-by-date list-name="partyTaxInfos"/>
+ <first-from-list entry-name="partyTaxInfo" list-name="partyTaxInfos"/>
+ <set value="${invoiceId}" field="invoiceItem.invoiceId"/>
+
+ <if-compare field-name="partyTaxInfo.isExempt" value="Y" operator="equals">
+ <!-- create one item record only -->
+ <set value="N" field="invoiceItem.taxableFlag"/>
+ <set field="invoiceItem.amount" from-field="payment.amount"/>
+ <if-compare field-name="payment.partyIdFrom" operator="equals" value="${parameters.organizationPartyId}">
+ <set value="PINV_MISC_CHARGE" field="invoiceItem.invoiceItemTypeId"/>
+ <else>
+ <set value="INV_MISC_CHARGE" field="invoiceItem.invoiceItemTypeId"/>
+ </else>
+ </if-compare>
+ <set value="Amount no VAT required" field="invoiceItem.description"/>
+ <call-service service-name="createInvoiceItem" in-map-name="invoiceItem"/>
+
+ <else> <!-- apply the sales tax -->
+
+ <!-- first invoiceItem -->
+ <set value="Y" field="invoiceItem.taxableFlag"/>
+ <calculate field-name="invoiceItem.amount" rounding-mode="HalfUp" >
+ <calcop operator="divide">
+ <calcop operator="multiply">
+ <calcop operator="get" field-name="payment.amount"/>
+ <number value="100"/>
+ </calcop>
+ <number value="119"/>
+ </calcop>
+ </calculate>
+ <if-compare field-name="payment.partyIdFrom" operator="equals" value="${parameters.organizationPartyId}">
+ <set value="PINV_SPROD_ITEM" field="invoiceItem.invoiceItemTypeId"/>
+ <else>
+ <set value="INV_SPROD_ITEM" field="invoiceItem.invoiceItemTypeId"/>
+ </else>
+ </if-compare>
+ <set value="Amount ex. VAT" field="invoiceItem.description"/>
+ <call-service service-name="createInvoiceItem" in-map-name="invoiceItem"/>
+
+ <!-- second record: create VAT record -->
+ <calculate field-name="invoiceItem.amount" rounding-mode="HalfUp" >
+ <calcop operator="divide">
+ <calcop operator="multiply">
+ <calcop operator="get" field-name="payment.amount"/>
+ <number value="19"/>
+ </calcop>
+ <number value="119"/>
+ </calcop>
+ </calculate>
+ <if-compare field-name="payment.partyIdFrom" operator="equals" value="${parameters.organizationPartyId}">
+ <set value="PINV_SALES_TAX" field="invoiceItem.invoiceItemTypeId"/>
+ <else>
+ <set value="INV_SALES_TAX" field="invoiceItem.invoiceItemTypeId"/>
+ </else>
+ </if-compare>
+ <set value="VAT 19%" field="invoiceItem.description"/>
+ <call-service service-name="createInvoiceItem" in-map-name="invoiceItem"/>
+ </else>
+ </if-compare>
+
<!-- apply the payment to the invoice -->
- <field-to-field field-name="invoice.invoiceId" to-field-name="application.invoiceId"/>
- <field-to-field field-name="payment.paymentId" to-field-name="application.paymentId"/>
+ <set value="${invoiceId}" field="application.invoiceId"/>
+ <set from-field="payment.paymentId" field="application.paymentId"/>
<call-service service-name="updatePaymentApplication" in-map-name="application"/>
</if-empty>
</iterate>
<to-string field-name="invoicesCreated"/>
<string-append field-name="invoicesCreated" string=" invoices created"/>
- <field-to-field field-name="invoicesCreated" to-field-name="_event_message_"/>
+ <set value="${invoicesCreated}" field="_event_message_"/>
+ <transaction-commit/>
</simple-method>
+
+ <!-- Post invoices and payments -->
+ <simple-method method-name="PostInvoicesStatements" short-description="--Post Invoices and Payments">
+ <!--check-permission permission="CATALOG" action="_CREATE">
+ <alt-permission permission="CATALOG_ROLE" action="_CREATE"/>
+ <fail-message message="Security Error: to update you need CATALOG_CREATE or CATALOG_ADMIN permission, or the limited CATALOG_ROLE_CREATE permission"/>
+ </check-permission>
+ <check-errors/-->
+ <entity-condition entity-name="Payment" list-name="payments">
+ <condition-list combine="and">
+ <condition-list combine="or">
+ <condition-expr field-name="partyIdFrom" operator="equals" value="${parameters.organizationPartyId}"/>
+ <condition-expr field-name="partyIdTo" operator="equals" value="${parameters.organizationPartyId}"/>
+ </condition-list>
+ <condition-list combine="or">
+ <condition-expr field-name="statusId" operator="equals" value="PMNT_RECEIVED"/>
+ <condition-expr field-name="statusId" operator="equals" value="PMNT_SENT"/>
+ </condition-list>
+ </condition-list>
+ </entity-condition>
+ <calculate field-name="invoicesUpdated"><number value="0"/></calculate>
+ <calculate field-name="paymentsUpdated"><number value="0"/></calculate>
+ <iterate entry-name="payment" list-name="payments">
+ <!-- only process fully applied payments -->
+ <set field="notApplied" value="${bsh:org.ofbiz.accounting.payment.PaymentExtWorker.getPaymentApplied(payment)}"/>
+ <if-compare field-name="notApplied" operator="equals" value="${payment.amount}">
+
+ <set field="payment.statusId" value="PMNT_CONFIRMED"/>
+ <store-value value-name="payment"/>
+ <check-errors/>
+ <calculate field-name="paymentsUpdated">
+ <calcop operator="add">
+ <calcop operator="get" field-name="paymentsUpdated"/>
+ <number value="1"/>
+ </calcop>
+ </calculate>
+ </if-compare>
+ <!-- find related invoices -->
+ <get-related value-name="payment" relation-name="PaymentApplication" list-name="paymentApplications"/>
+ <first-from-list entry-name="paymentApplication" list-name="paymentApplications"/>
+ <get-related value-name="paymentApplication" relation-name="Invoice" list-name="invoices"/>
+ <first-from-list entry-name="invoice" list-name="invoices"/>
+ <set field="applied" value="${bsh:org.ofbiz.accounting.invoice.InvoiceExtWorker.getInvoiceApplied(invoice)}"/>
+ <set field="total" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}"/>
+ <if-compare field-name="applied" operator="equals" value="${total}">
+
+ <set-service-fields service-name="setInvoiceStatus" map-name="invoice" to-map-name="param"/>
+ <if-compare field-name="invoice.invoiceTypeId" value="SALES_INVOICE" operator="equals">
+ <if-compare field-name="param.statusId" value="INVOICE_IN_PROCESS" operator="equals">
+ <set field="param.statusId" value="INVOICE_READY"/>
+ <call-service service-name="setInvoiceStatus" in-map-name="param"/>
+ </if-compare>
+ <if-compare field-name="param.statusId" value="INVOICE_READY" operator="equals">
+ <set field="param.statusId" value="INVOICE_SENT"/>
+ <call-service service-name="setInvoiceStatus" in-map-name="param"/>
+ </if-compare>
+ <if-compare field-name="param.statusId" value="INVOICE_SENT" operator="equals">
+ <set field="param.statusId" value="INVOICE_PAID"/>
+ <call-service service-name="setInvoiceStatus" in-map-name="param"/>
+ </if-compare>
+ </if-compare>
+
+ <if-compare field-name="invoice.invoiceTypeId" value="PURCHASE_INVOICE" operator="equals">
+ <if-compare field-name="param.statusId" value="INVOICE_IN_PROCESS" operator="equals">
+ <set field="param.statusId" value="INVOICE_RECEIVED"/>
+ <call-service service-name="setInvoiceStatus" in-map-name="param"/>
+ </if-compare>
+ <if-compare field-name="param.statusId" value="INVOICE_RECEIVED" operator="equals">
+ <set field="param.statusId" value="INVOICE_PAID"/>
+ <call-service service-name="setInvoiceStatus" in-map-name="param"/>
+ </if-compare>
+ </if-compare>
+
+ <check-errors/>
+
+ <calculate field-name="invoicesUpdated">
+ <calcop operator="add">
+ <calcop operator="get" field-name="invoicesUpdated"/>
+ <number value="1"/>
+ </calcop>
+ </calculate>
+
+ </if-compare>
+
+ </iterate>
+ <set field="message" value="Posting payments and related invoices. "/>
+ <to-string field-name="invoicesUpdated"/>
+ <string-append field-name="message" string="${invoicesUpdated}"/>
+ <string-append field-name="message" string=" invoices updated"/>
+ <to-string field-name="paymentsUpdated"/>
+ <string-append field-name="message" string="${paymentsUpdated}"/>
+ <string-append field-name="message" string=" payments updated"/>
+ <set value="${message}" field="_event_message_"/>
+ </simple-method>
</simple-methods>
\ No newline at end of file
Modified: trunk/specialized/opentravelsystem/src/org/ofbiz/opentravelsystem/mt940.java
===================================================================
--- trunk/specialized/opentravelsystem/src/org/ofbiz/opentravelsystem/mt940.java 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/src/org/ofbiz/opentravelsystem/mt940.java 2005-10-10 02:56:14 UTC (rev 5942)
@@ -109,7 +109,7 @@
boolean debug = true;
- if (getFile(request).compareTo("error") == 0 || localFile.length() == 0) { // get the content of the uploaded file...
+ if (getFile(request).equals("error") || localFile == null || localFile.length() == 0) { // get the content of the uploaded file...
request.setAttribute("_ERROR_MESSAGE_", "Uploaded file not found or an empty file......");
return "error";
}
@@ -128,17 +128,20 @@
if (debug) Debug.logInfo("Start processing payments...", module);
while (getPayment(request) != null) {
if (debet == false) {
- payment.put("statusId","PMNT_NOT_PAID");
+ payment.put("paymentTypeId","CUSTOMER_PAYMENT");
+ payment.put("statusId","PMNT_RECEIVED"); // will start the posting service
payment.put("partyIdFrom",getParty(delegator));
payment.put("partyIdTo", accountPartyId); }
else { // credit
- payment.put("statusId","PMNT_NOT_PAID");
+ payment.put("paymentTypeId","VENDOR_PAYMENT");
+ payment.put("statusId","PMNT_SENT"); // will start the posting service
payment.put("partyIdTo",getParty(delegator));
payment.put("partyIdFrom", accountPartyId); }
// check to see if the parties where found, when not create
if (payment.get("partyIdTo") == null || payment.get("partyIdFrom") == null) {
- if (createParty(delegator) == null) return "error"; // party creation error
+ if (createParty(delegator) == null)
+ return "error"; // party creation error
if (debet == false) {
payment.put("partyIdFrom",party.getString("partyId"));
}
@@ -147,7 +150,6 @@
}
}
// set other fields in payment record
- payment.put("paymentTypeId","RECEIPT");
payment.put("paymentMethodId", paymentMethod.get("paymentMethodId"));
payment.put("paymentMethodTypeId","EFT_ACCOUNT");
// check if the payment was already uploaded.....
@@ -158,14 +160,15 @@
}
else {
// finally create payment record.
- // TODO use services here in order to trigger ledger routines....
payment.put("userLogin",userLogin);
payment.put("locale", loc);
try {
dispatcher.runSync("createPayment", payment);
} catch (GenericServiceException e1) {
Debug.logError(e1, "Error creating payment", module);
+ continue;
}
+
paymentsCreated++;
}
}
@@ -337,19 +340,17 @@
Debug.logWarning("[DataExchange.mt940] No files uploaded", module);
return "error";
}
- Map passedParams = new HashMap();
FileItem fi = null;
- byte[] imageBytes = {};
for (int i = 0; i < lst.size(); i++) {
fi = (FileItem) lst.get(i);
String fieldName = fi.getFieldName();
- // Debug.logInfo("DataExchange fieldName: " + fieldName, module);
- // Debug.logInfo("DataExchange in isInMem: " + fi.isInMemory(), module);
- // Debug.logInfo("DataExchange in getstring: " + fi.getString(), module);
- // Debug.logInfo("DataExchange in getSize: " + fi.getSize(), module);
- // Debug.logInfo("DataExchange in get: " + fi.get(), module);
- // Debug.logInfo("DataExchange in getContentType: " + fi.getContentType(), module);
- // Debug.logInfo("DataExchange in isFormField: " + fi.isFormField(), module);
+ // Debug.logInfo("DataExchange fieldName: " + fieldName, module);
+ // Debug.logInfo("DataExchange in isInMem: " + fi.isInMemory(), module);
+ // Debug.logInfo("DataExchange in getstring: " + fi.getString(), module);
+ // Debug.logInfo("DataExchange in getSize: " + fi.getSize(), module);
+ // Debug.logInfo("DataExchange in get: " + fi.get(), module);
+ // Debug.logInfo("DataExchange in getContentType: " + fi.getContentType(), module);
+ // Debug.logInfo("DataExchange in isFormField: " + fi.isFormField(), module);
if (fi.getFieldName().compareTo("localFile") == 0) // uploaded file found....
localFile = fi.getString();
Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/WEB-INF/controller.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/WEB-INF/controller.xml 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/WEB-INF/controller.xml 2005-10-10 02:56:14 UTC (rev 5942)
@@ -2246,19 +2246,18 @@
<response name="success" type="view" value="editPaymentApplications"/>
<response name="error" type="view" value="editPaymentApplications"/>
</request-map>
- <!-- =============== Data exchange =================-->
- <request-map uri="DataExchange">
+ <!-- =============== Accouting Utilities =================-->
+ <request-map uri="Utilities">
<security https="true" auth="true"/>
+ <response name="success" type="view" value="Utilities"/>
+ </request-map>
+ <!--request-map uri="DataExchange">
+ <security https="true" auth="true"/>
<response name="success" type="view" value="DataExchange"/>
- </request-map>
+ </request-map-->
<request-map uri="uploadDataFile">
<security https="true" auth="true"/>
<event type="java" path="org.ofbiz.opentravelsystem.mt940" invoke="importData"/>
- <response name="success" type="view" value="DataExchange"/>
- </request-map>
- <!-- =============== Data exchange =================-->
- <request-map uri="Utilities">
- <security https="true" auth="true"/>
<response name="success" type="view" value="Utilities"/>
</request-map>
<request-map uri="CreateInvoicesFromPayments">
@@ -2266,12 +2265,20 @@
<event type="simple" path="org/ofbiz/opentravelsystem/Utilities.xml" invoke="CreateInvoicesFromPayments"/>
<response name="success" type="view" value="Utilities"/>
</request-map>
- <!-- Accounting Setup -->
+ <request-map uri="PostInvoicesStatements">
+ <security https="true" auth="true"/>
+ <event type="simple" path="org/ofbiz/opentravelsystem/Utilities.xml" invoke="PostInvoicesStatements"/>
+ <response name="success" type="view" value="Utilities"/>
+ </request-map>
<!-- ================ Administratvie Requests ================ -->
<request-map uri="AdminMain">
<security https="true" auth="true"/>
<response name="success" type="view" value="AdminMain"/>
</request-map>
+ <request-map uri="TimePeriods">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="AdminMain"/>
+ </request-map>
<request-map uri="PartyAcctgPreference">
<security https="true" auth="true"/>
<response name="success" type="view" value="PartyAcctgPreference"/>
@@ -2309,6 +2316,26 @@
<response name="success" type="view" value="ViewFXConversions"/>
<response name="error" type="view" value="ViewFXConversions"/>
</request-map>
+
+ <request-map uri="GlAccountAssignment">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="GlAccountAssignment"/>
+ </request-map>
+
+ <request-map uri="addPaymentGlAssignment">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="addPaymentGlAssignment"/>
+ <response name="success" type="view" value="GlAccountAssignment"/>
+ <response name="error" type="view" value="GlAccountAssignment"/>
+ </request-map>
+
+ <request-map uri="removePaymentGlAssignment">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="removePaymentGlAssignment"/>
+ <response name="success" type="view" value="GlAccountAssignment"/>
+ <response name="error" type="view" value="GlAccountAssignment"/>
+ </request-map>
+
<!-- =============== Accounting Reports =================-->
<request-map uri="AccountingReports">
<security https="true" auth="true"/>
@@ -2358,6 +2385,14 @@
<!-- security https="true" auth="true"/ -->
<response name="success" type="view" value="ListGlAccountOrganization"/>
</request-map>
+ <request-map uri="ListGlAccountEntries">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ListGlAccountEntries"/>
+ </request-map>
+ <request-map uri="ListAcctgTransEntries">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ListAcctgTransEntries"/>
+ </request-map>
<request-map uri="Ledger">
<security https="true" auth="true"/>
<response name="success" type="view" value="ListGlAccountOrganization"/>
@@ -2368,6 +2403,32 @@
<response name="success" type="view" value="ListGlAccountOrganization"/>
<response name="error" type="view" value="ListGlAccountOrganization"/>
</request-map>
+
+ <!-- Select account to reconcile -->
+ <request-map uri="reconcileAccounts">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ReconcileAccounts"/>
+ <response name="error" type="view" value="AdminMain"/>
+ </request-map>
+ <request-map uri="ReconcileGlAccountOrganization">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ReconcileGlAccountOrganization"/>
+ </request-map>
+ <!-- Actually reconcile account -->
+ <request-map uri="reconcileGlAccount">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="reconcileGlAccount"/>
+ <response name="success" type="view" value="ViewGlAccountBalance"/>
+ <response name="error" type="view" value="ReconcileAccounts"/>
+ </request-map>
+ <request-map uri="viewGlAccountBalance">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ViewGlAccountBalance"/>
+ </request-map>
+ <request-map uri="viewGlReconciliation">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ViewGlReconciliation"/>
+ </request-map>
<!-- end of request mappings -->
@@ -2410,8 +2471,8 @@
<view-map name="updateFixedAssetProduct" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/CatalogScreens.xml#updateFixedAssetProduct"/>
<view-map name="removeFixedAssetProduct" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/CatalogScreens.xml#removeFixedAssetProduct"/>
<view-map name="ListFixedAssetCalendar" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/CatalogScreens.xml#ListFixedAssetCalendar"/>
- <!-- Settings screens -->
- <view-map name="mainSettings" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/SettingsScreens.xml#main"/>
+ <!-- Settings screens not used? -->
+ <!--view-map name="mainSettings" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/SettingsScreens.xml#main"/-->
<!-- reservations /orders -->
<view-map name="findorders" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/OrderScreens.xml#main"/>
<view-map name="orderview" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/OrderScreens.xml#orderview"/>
@@ -2446,10 +2507,9 @@
<view-map name="paymentOverview" type="screen" page="component://accountingext/widget/PaymentScreens.xml#PaymentOverview"/>
<view-map name="editPayment" type="screen" page="component://accountingext/widget/PaymentScreens.xml#EditPayment"/>
<view-map name="editPaymentApplications" type="screen" page="component://accountingext/widget/PaymentScreens.xml#EditPaymentApplications"/>
- <!-- data exchange -->
- <view-map name="DataExchange" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml#DataExchange"/>
- <!-- Utilities -->
+ <!-- Accounting Utilities -->
<view-map name="Utilities" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml#Utilities"/>
+ <!--view-map name="DataExchange" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml#DataExchange"/-->
<!-- accounting reports -->
<view-map name="AccountingReports" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml#reports"/>
<view-map name="VatReport" type="screenfop" page="component://opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml#VatReport" content-type="application/pdf" encoding="none"/>
@@ -2463,8 +2523,17 @@
<view-map name="PartyAcctgPreference" type="screen" page="component://accountingext/widget/AdminScreens.xml#PartyAcctgPreference"/>
<view-map name="ViewFXConversions" type="screen" page="component://accountingext/widget/AdminScreens.xml#ViewFXConversions"/>
<view-map name="ListUnpostedAcctgTrans" type="screen" page="component://accountingext/widget/AccountingScreens.xml#ListUnpostedAcctgTrans"/>
+ <view-map name="GlAccountAssignment" type="screen" page="component://accountingext/widget/AdminScreens.xml#GlAccountAssignment"/>
<!-- GL organisation -->
<view-map name="ListGlAccountOrganization" type="screen" page="component://accountingext/widget/AccountingScreens.xml#ListGlAccountOrganization"/>
<view-map name="AssignGlAccount" type="screen" page="component://accountingext/widget/AccountingScreens.xml#AssignGlAccount"/>
+ <view-map name="ListGlAccountEntries" type="screen" page="component://accountingext/widget/AccountingScreens.xml#ListGlAccountEntries"/>
+ <view-map name="ListAcctgTransEntries" type="screen" page="component://accountingext/widget/AccountingScreens.xml#ListAcctgTransEntries"/>
+ <!-- Reconciliation viewmaps -->
+ <view-map name="ReconcileGlAccountOrganization" type="screen" page="component://accountingext/widget/AccountingScreens.xml#ReconcileGlAccountOrganization"/>
+ <view-map name="ReconcileAccounts" type="screen" page="component://accountingext/widget/AccountingScreens.xml#ReconcileAccounts"/>
+ <view-map name="ViewGlAccountBalance" type="screen" page="component://accountingext/widget/AccountingScreens.xml#ViewGlAccountBalance"/>
+ <view-map name="ViewGlReconciliation" type="screen" page="component://accountingext/widget/AccountingScreens.xml#ViewGlReconciliation"/>
+
<!-- end of view mappings -->
</site-conf>
Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/accounting/appheaderAccounting.ftl
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/accounting/appheaderAccounting.ftl 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/accounting/appheaderAccounting.ftl 2005-10-10 02:56:14 UTC (rev 5942)
@@ -41,7 +41,7 @@
<div class="col"><a href="<@ofbizUrl>findPayments</@ofbizUrl>" class="${selectedLeftClassMap.payments?default(unselectedLeftClassName)}">${uiLabelMap.AccountingPaymentsMenu}</a></div>
<div class="col"><a href="<@ofbizUrl>Ledger</@ofbizUrl>" class="${selectedLeftClassMap.Ledger?default(unselectedLeftClassName)}">Gen.Ledger</a></div>
<div class="col"><a href="<@ofbizUrl>AccountingReports</@ofbizUrl>" class="${selectedLeftClassMap.Reports?default(unselectedLeftClassName)}">Reports</a></div>
- <div class="col"><a href="<@ofbizUrl>DataExchange</@ofbizUrl>" class="${selectedLeftClassMap.DataExchange?default(unselectedLeftClassName)}">Bank Upload</a></div>
+ <!--div class="col"><a href="<@ofbizUrl>DataExchange</@ofbizUrl>" class="${selectedLeftClassMap.DataExchange?default(unselectedLeftClassName)}">Bank Upload</a></div-->
<div class="col"><a href="<@ofbizUrl>Utilities</@ofbizUrl>" class="${selectedLeftClassMap.Utilities?default(unselectedLeftClassName)}">Utilities</a></div>
<div class="col"><a href="<@ofbizUrl>AdminMain</@ofbizUrl>" class="${selectedLeftClassMap.Setup?default(unselectedLeftClassName)}">Setup</a></div>
Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/AccountingForms.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/AccountingForms.xml 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/AccountingForms.xml 2005-10-10 02:56:14 UTC (rev 5942)
@@ -26,6 +26,7 @@
<form name="DataExchange" target="uploadDataFile" title="Upload data file" type="upload"
default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
+ <!--field name="organizationPartyId"><hidden value="${organizationPartyId}"/></field-->
<field name="localFile" title="Local file name">
<file />
</field>
@@ -35,11 +36,19 @@
</form>
<form name="CreateInvoicesFromPayments" target="CreateInvoicesFromPayments" title="Create Invoices from Payments" type="single"
default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
+ <field name="organizationPartyId"><hidden value="${organizationPartyId}"/></field>
<!--field position="1" name="partyIdFrom"><lookup target-form-name="LookupPartyName"/></field>
<field position="2" name="partyIdTo"><lookup target-form-name="LookupPartyName"/></field-->
<field name="submitButton" title="Copy" widget-style="smallSubmit">
<submit button-type="button"/>
</field>
</form>
+ <form name="PostInvoicesStatements" target="PostInvoicesStatements" title="Post Invoices and Payments" type="single"
+ default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
+ <field name="organizationPartyId"><hidden value="${organizationPartyId}"/></field>
+ <field name="submitButton" title="Post" widget-style="smallSubmit">
+ <submit button-type="button"/>
+ </field>
+ </form>
</forms>
\ No newline at end of file
Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/AccountingScreens.xml 2005-10-10 02:56:14 UTC (rev 5942)
@@ -30,7 +30,6 @@
<set field="page.appTabButtonItem" value="Product"/>
<set field="page.headerItem" value="main"/>
<set field="prodCatalogId" from-scope="user" from-field="prodCatalogId"/>
- <set field="productStoreId" from-scope="user" from-field="productStoreId" global="true"/>
<!--set field="leftbarScreenName" value="leftbar"/-->
</actions>
<widgets>
@@ -49,37 +48,47 @@
</section>
</screen>
- <screen name="DataExchange">
+ <!--screen name="DataExchange">
<section>
<actions>
<set field="title" value="Data Exchange"/>
<set field="headerItem" value="DataExchange"/>
+ <set field="organizationPartyId" from-scope="user" from-field="productStoreId" to-scope="application"/>
</actions>
<widgets>
<decorator-screen name="mainAccountingDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container>
- <label style="head1">MT940 file upload.</label>
+ <label style="head1">Bankstatement MT940 file upload.</label>
</container>
<include-form name="DataExchange" location="component://opentravelsystem/webapp/hotelbackend/screens/AccountingForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
- </screen>
+ </screen-->
<screen name="Utilities">
<section>
<actions>
<set field="title" value="Utilities"/>
<set field="headerItem" value="Utilities"/>
+ <set field="organizationPartyId" from-scope="user" from-field="productStoreId"/>
</actions>
<widgets>
<decorator-screen name="mainAccountingDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container>
+ <label style="head1">Bankstatement MT940 file upload.</label>
+ </container>
+ <include-form name="DataExchange" location="component://opentravelsystem/webapp/hotelbackend/screens/AccountingForms.xml"/>
+ <container>
<label style="head1">Create Invoices from payments.</label>
</container>
<include-form name="CreateInvoicesFromPayments" location="component://opentravelsystem/webapp/hotelbackend/screens/AccountingForms.xml"/>
+ <container>
+ <label style="head1">Post Invoices and payments by changing the status.</label>
+ </container>
+ <include-form name="PostInvoicesStatements" location="component://opentravelsystem/webapp/hotelbackend/screens/AccountingForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -93,15 +102,13 @@
<set field="page.appTabButtonItem" value="Reservations"/>
<set field="page.headerItem" value="Reports"/>
<set field="title" value="Accounting Report Options"/>
- <set field="productStoreId" from-scope="user" from-field="productStoreId"/>
<set field="organizationPartyId" from-scope="user" from-field="productStoreId" />
- <!-- <set field="titleProperty" value=""/> -->
</actions>
<widgets>
<decorator-screen name="mainAccountingDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container>
- <label style="head1" text="Accounting Reports"/>
+ <label style="head1" text="Accounting Reports for ${organizationPartyId}"/>
</container>
<container>
<label style="head2" text="VAT report"/>
@@ -129,6 +136,7 @@
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="Vat Report"/>
<set field="productStoreId" from-scope="user" from-field="productStoreId"/>
+ <set field="organizationPartyId" from-scope="user" from-field="productStoreId" to-scope="application"/>
<entity-condition entity-name="Invoice" list-name="invoices">
<condition-list combine="or">
<condition-expr field-name="partyIdFrom" operator="equals" value="Company"/>
Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/CommonScreens.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/CommonScreens.xml 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/CommonScreens.xml 2005-10-10 02:56:14 UTC (rev 5942)
@@ -50,6 +50,8 @@
<!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
<set field="productStoreId" from-scope="user" from-field="productStoreId"/>
<set field="organizationPartyId" from-scope="user" from-field="productStoreId" />
+ <set field="requestParameters.organizationPartyId" from-scope="user" from-field="productStoreId" />
+ <set field="parameters.organizationPartyId" from-scope="user" from-field="productStoreId" />
<set field="activeApp" value="hotelbackend" global="true"/>
</actions>
<widgets>
@@ -66,9 +68,10 @@
</section>
</screen>
-<!-- second level decorator for each tab like product, customer, settings etc -->
+<!-- second level decorator for each tab like product, customeretc -->
- <screen name="SettingsDecorator">
+<!-- setting is moved a level deeper.. -->
+ <!--screen name="SettingsDecorator">
<section>
<actions>
<set field="page.appTabButtonItem" value="Settings"/>
@@ -85,7 +88,6 @@
<decorator-section-include name="body"/>
</container>
<container style="endcolumns"><label text="&nbsp;"/></container>
- <!--/container-->
</container>
</container>
@@ -93,19 +95,19 @@
</decorator-screen>
</widgets>
</section>
- </screen>
+ </screen-->
- <screen name="CustomerDecorator">
+ <screen name="CatalogDecorator">
<section>
<actions>
- <set field="page.appTabButtonItem" value="Customers"/>
+ <set field="page.appTabButtonItem" value="Product"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="body">
<container style="centerarea">
- <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/party/appheaderCustomer.ftl"/></html></platform-specific>
+ <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/catalog/appheaderCatalog.ftl"/></html></platform-specific>
<container style="contentarea">
<container style="${MainColumnStyle}">
<platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific>
@@ -121,17 +123,18 @@
</widgets>
</section>
</screen>
- <screen name="CatalogDecorator">
+
+ <screen name="CustomerDecorator">
<section>
<actions>
- <set field="page.appTabButtonItem" value="Product"/>
+ <set field="page.appTabButtonItem" value="Customers"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="body">
<container style="centerarea">
- <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/catalog/appheaderCatalog.ftl"/></html></platform-specific>
+ <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/party/appheaderCustomer.ftl"/></html></platform-specific>
<container style="contentarea">
<container style="${MainColumnStyle}">
<platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific>
@@ -180,7 +183,7 @@
<set field="page.appTabButtonItem" value="Accounting"/>
</actions>
<widgets>
- <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="main-decorator">
<decorator-section name="body">
<container style="centerarea">
@@ -377,8 +380,7 @@
<screen name="CommonAdminDecorator">
<section>
<actions>
- <set field="headerItem" value="Accounting"/>
- <set field="organizationPartyId" from-scope="user" from-field="productStoreId"/>
+ <set field="organizationPartyId" from-scope="user" from-field="productStoreId" />
</actions>
<widgets>
<decorator-screen name="mainAccountingDecorator">
Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/MainScreens.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/MainScreens.xml 2005-10-09 22:15:45 UTC (rev 5941)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/MainScreens.xml 2005-10-10 02:56:14 UTC (rev 5942)
@@ -40,7 +40,7 @@
<set field="webSiteId" from-scope="user" from-field="webSiteId" global="true"/>
</actions>
<widgets>
- <decorator-screen name="SettingsDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CatalogDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<!--content content-id="otsfrontpage"/--> <!-- get page from internal cms instead of main.ftl below-->
<content content-id="testcontent"/> <!-- xml/xsl test-->
@@ -69,7 +69,7 @@
<set field="webSiteId" from-scope="user" from-field="webSiteId" global="true"/>
</actions>
<widgets>
- <decorator-screen name="SettingsDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CatalogDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<!--content content-id="otsfrontpage"/--> <!-- get page from internal cms instead of main.ftl below-->
<!--content content-id="otsxmlxsl"/--> <!-- xml/xsl test-->
@@ -90,7 +90,7 @@
<set field="page.headerItem" value="intro"/>
</actions>
<widgets>
- <decorator-screen name="SettingsDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CatalogDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific>
<html>
@@ -109,7 +109,7 @@
<set field="page.headerItem" value="main"/>
</actions>
<widgets>
- <decorator-screen name="SettingsDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-screen name="CatalogDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific>
<html>
More information about the Svn
mailing list