From b0ead4966dfe094f12ad543bb63b2767f4e68ab3 Mon Sep 17 00:00:00 2001 From: Scott Gray Date: Sat, 7 Jun 2008 09:45:26 +0000 Subject: [PATCH] Capitalized the accounting script's names also switched a couple of screens to use the screenlet widget git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@664307 13f79535-47bb-0310-9956-ffa450edef68 --- ...ceipts.groovy => FilterOutReceipts.groovy} | 0 ...y => ListInvoiceItemTypesGlAccount.groovy} | 0 ...Entry.groovy => EditGlJournalEntry.groovy} | 0 ...st.groovy => CreateApplicationList.groovy} | 0 ...{editInvoice.groovy => EditInvoice.groovy} | 0 ...ypes.groovy => GetInvoiceItemTypes.groovy} | 0 ...tem.groovy => OrderListInvoiceItem.groovy} | 0 .../invoice/listNotAppliedPayments.groovy | 91 ------------------- ...ers.groovy => BillingAccountOrders.groovy} | 0 ...s.groovy => ListNotAppliedInvoices.groovy} | 0 ...s.groovy => ListNotAppliedPayments.groovy} | 0 .../{manualTx.groovy => ManualTx.groovy} | 0 ...{printChecks.groovy => PrintChecks.groovy} | 0 ...ion.groovy => AuthorizeTransaction.groovy} | 0 ...ction.groovy => CaptureTransaction.groovy} | 0 ...onse.groovy => ViewGatewayResponse.groovy} | 0 .../widget/AccountingPrintScreens.xml | 2 +- .../widget/BillingAccountScreens.xml | 91 ++++--------------- applications/accounting/widget/GlScreens.xml | 6 +- .../accounting/widget/GlSetupForms.xml | 4 +- .../accounting/widget/InvoiceScreens.xml | 10 +- .../accounting/widget/PaymentScreens.xml | 8 +- .../accounting/widget/TransactionScreens.xml | 6 +- 23 files changed, 36 insertions(+), 182 deletions(-) rename applications/accounting/webapp/accounting/WEB-INF/actions/admin/{filterOutReceipts.groovy => FilterOutReceipts.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/admin/{listInvoiceItemTypesGlAccount.groovy => ListInvoiceItemTypesGlAccount.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/{editGlJournalEntry.groovy => EditGlJournalEntry.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/invoice/{createApplicationList.groovy => CreateApplicationList.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/invoice/{editInvoice.groovy => EditInvoice.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/invoice/{getInvoiceItemTypes.groovy => GetInvoiceItemTypes.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/invoice/{orderListInvoiceItem.groovy => OrderListInvoiceItem.groovy} (100%) delete mode 100644 applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.groovy rename applications/accounting/webapp/accounting/WEB-INF/actions/order/{billingAccountOrders.groovy => BillingAccountOrders.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/payment/{listNotAppliedInvoices.groovy => ListNotAppliedInvoices.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/payment/{listNotAppliedPayments.groovy => ListNotAppliedPayments.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/payment/{manualTx.groovy => ManualTx.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/payment/{printChecks.groovy => PrintChecks.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/transaction/{authorizeTransaction.groovy => AuthorizeTransaction.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/transaction/{captureTransaction.groovy => CaptureTransaction.groovy} (100%) rename applications/accounting/webapp/accounting/WEB-INF/actions/transaction/{viewGatewayResponse.groovy => ViewGatewayResponse.groovy} (100%) diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/admin/filterOutReceipts.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/admin/FilterOutReceipts.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/admin/filterOutReceipts.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/admin/FilterOutReceipts.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/admin/ListInvoiceItemTypesGlAccount.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/editGlJournalEntry.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/EditGlJournalEntry.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/editGlJournalEntry.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/chartofaccounts/EditGlJournalEntry.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/createApplicationList.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/invoice/createApplicationList.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/invoice/EditInvoice.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/getInvoiceItemTypes.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/invoice/getInvoiceItemTypes.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/orderListInvoiceItem.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/invoice/orderListInvoiceItem.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.groovy deleted file mode 100644 index 23f6d5972e..0000000000 --- a/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.groovy +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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. - */ - -import java.util.*; -import org.ofbiz.entity.*; -import org.ofbiz.base.util.*; -import org.ofbiz.base.util.collections.*; -import org.ofbiz.accounting.invoice.*; -import org.ofbiz.accounting.payment.*; -import org.ofbiz.accounting.util.UtilAccounting; -import java.text.DateFormat; -import java.math.*; -import org.ofbiz.entity.condition.EntityConditionList; -import org.ofbiz.entity.condition.EntityExpr; -import org.ofbiz.entity.condition.EntityOperator; -import org.ofbiz.entity.model.*; -import java.text.NumberFormat; - -invoiceId = parameters.invoiceId; -invoice = delegator.findByPrimaryKey("Invoice", [invoiceId : invoiceId]); - -decimals = UtilNumber.getBigDecimalScale("invoice.decimals"); -rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding"); - -paymentsMapList = []; // to pass back to the screeen list of unapplied payments - -// retrieve payments for the related parties which have not been (fully) applied yet -List payments = null; -GenericValue payment = null; -exprList = []; -expr = EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, invoice.partyIdFrom); -exprList.add(expr); -expr = EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, invoice.partyId); -exprList.add(expr); - -// only payments with received and sent and not paid -exprListStatus = []; -expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_NOT_PAID"); -exprListStatus.add(expr); -expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED"); -exprListStatus.add(expr); -expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_SENT"); -exprListStatus.add(expr); -orCond = EntityCondition.makeCondition(exprListStatus, EntityOperator.OR); -exprList.add(orCond); - -topCond = EntityCondition.makeCondition(exprList, EntityOperator.AND); - -payments = delegator.findList("Payment", topCond, null, ["effectiveDate"], null, false); -if (payments) { - List paymentApplications = null; - GenericValue paymentApplication = null; - invoiceApplied = InvoiceWorker.getInvoiceAppliedBd(invoice); - invoiceAmount = InvoiceWorker.getInvoiceTotalBd(invoice); - invoiceToApply = InvoiceWorker.getInvoiceNotApplied(invoice); - payments.each { payment -> - if (PaymentWorker.getPaymentNotAppliedBd(payment).signum() == 1) { - // put in the map - Map paymentMap = [:]; - paymentMap.paymentId = payment.paymentId; - paymentMap.effectiveDate = payment.effectiveDate.substring(0,10); // list as YYYY-MM-DD - paymentMap.amount = payment.getBigDecimal("amount"); - paymentMap.currencyUomId = payment.currencyUomId; - paymentMap.amountApplied = PaymentWorker.getPaymentAppliedBd(payment); - BigDecimal paymentToApply = PaymentWorker.getPaymentNotAppliedBd(payment); - if (paymentToApply.compareTo(invoiceToApply) < 0 ) { - paymentMap.amountToApply = paymentToApply; - } else { - paymentMap.amountToApply = invoiceToApply; - } - paymentsMapList.add(paymentMap); - } - } -} -context.payments = paymentsMapList; diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/order/billingAccountOrders.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/order/billingAccountOrders.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/order/BillingAccountOrders.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedInvoices.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedInvoices.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedInvoices.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/payment/ListNotAppliedPayments.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/payment/manualTx.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/payment/manualTx.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/payment/ManualTx.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/payment/printChecks.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/payment/printChecks.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeTransaction.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/transaction/AuthorizeTransaction.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureTransaction.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureTransaction.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/transaction/CaptureTransaction.groovy diff --git a/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/viewGatewayResponse.groovy b/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy similarity index 100% rename from applications/accounting/webapp/accounting/WEB-INF/actions/transaction/viewGatewayResponse.groovy rename to applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ViewGatewayResponse.groovy diff --git a/applications/accounting/widget/AccountingPrintScreens.xml b/applications/accounting/widget/AccountingPrintScreens.xml index 8c50089216..77942fd99f 100644 --- a/applications/accounting/widget/AccountingPrintScreens.xml +++ b/applications/accounting/widget/AccountingPrintScreens.xml @@ -32,7 +32,7 @@ under the License. -