Author: sichen
Date: Wed Nov 22 12:49:10 2006 New Revision: 478318 URL: http://svn.apache.org/viewvc?view=rev&rev=478318 Log: Moved an entity which should be in accounting/ and whose entitygroup definition is in accounting/ from order to accounting Modified: incubator/ofbiz/trunk/applications/accounting/config/payment.properties incubator/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java incubator/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/viewInvoice.fo.ftl incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java Modified: incubator/ofbiz/trunk/applications/accounting/config/payment.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/config/payment.properties?view=diff&rev=478318&r1=478317&r2=478318 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/config/payment.properties (original) +++ incubator/ofbiz/trunk/applications/accounting/config/payment.properties Wed Nov 22 12:49:10 2006 @@ -300,7 +300,7 @@ # Transaction Url #payment.authorizedotnet.url=https://secure.authorize.net/gateway/transact.dll # Test Url -payment.authorizedotnet.url=https://certification.authorize.net/gateway/transact.dll +payment.authorizedotnet.url=https://test.authorize.net/gateway/transact.dll # Version - version 3.0 is currently the only supported version for ofbiz. eventually version 3.1 may be available payment.authorizedotnet.version=3.0 @@ -318,7 +318,7 @@ payment.authorizedotnet.emailcustomer=FALSE # Trans Key - to use version 3.1 you must register a Transaction Key with the authorize.net -payment.authorizedotnet.trankey= +payment.authorizedotnet.trankey=DvWxZ96KagUJ3R99 # Email Merchant? - if should send email to the merchant for each transaction payment.authorizedotnet.emailmerchant=FALSE @@ -330,7 +330,7 @@ payment.authorizedotnet.relay=FALSE # Username - your authorize.net userid -payment.authorizedotnet.login= +payment.authorizedotnet.login=s5Aud9T7Y # Password - your authorize.net password payment.authorizedotnet.password= Modified: incubator/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?view=diff&rev=478318&r1=478317&r2=478318 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Wed Nov 22 12:49:10 2006 @@ -2852,6 +2852,23 @@ <key-map field-name="glAccountId"/> </relation> </entity> + <view-entity entity-name="TaxAuthorityGlAccountBalance" + package-name="org.ofbiz.accounting.tax" + title="For viewing balances of tax authority GL accounts"> + <member-entity entity-alias="TAGA" entity-name="TaxAuthorityGlAccount"/> + <member-entity entity-alias="GLAO" entity-name="GlAccountOrganization"/> + <member-entity entity-alias="PAP" entity-name="PartyAcctgPreference"/> + <alias-all entity-alias="TAGA"/> + <alias-all entity-alias="GLAO"/> + <alias entity-alias="PAP" name="baseCurrencyUomId"/> + <view-link entity-alias="TAGA" rel-entity-alias="GLAO"> + <key-map field-name="glAccountId"/> + <key-map field-name="organizationPartyId"/> + </view-link> + <view-link entity-alias="TAGA" rel-entity-alias="PAP"> + <key-map field-name="organizationPartyId" rel-field-name="partyId"/> + </view-link> + </view-entity> <entity entity-name="TaxAuthorityRateProduct" package-name="org.ofbiz.accounting.tax" title="Tax Authority Rate Entity"> <field name="taxAuthorityRateSeqId" type="id-ne"></field> <field name="taxAuthGeoId" type="id-ne"></field> Modified: incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?view=diff&rev=478318&r1=478317&r2=478318 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Wed Nov 22 12:49:10 2006 @@ -366,7 +366,7 @@ <log level="info" message="Invoice not found, invoice Id: ${invoiceId}"/> <check-errors/> </if-empty> - <!-- check if the status is not Paid... --> + <!-- if the invoice is already PAID, then set it back to READY and clear out the paidDate --> <if-compare field-name="invoice.statusId" operator="equals" value="INVOICE_PAID"> <set field="invoiceStatusMap.invoiceId" value="${paymentApplication.invoiceId}" /> <set field="invoiceStatusMap.statusId" value="INVOICE_READY"/> Modified: incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java?view=diff&rev=478318&r1=478317&r2=478318 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java (original) +++ incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/agreement/AgreementServices.java Wed Nov 22 12:49:10 2006 @@ -100,8 +100,9 @@ quantity = quantity.abs(); String productId = (String) context.get("productId"); String invoiceItemTypeId = (String) context.get("invoiceItemTypeId"); + // Collect agreementItems applicable to this orderItem/returnItem - // Use the view entity to reduce database access and cache to improve performance + // TODO: partyIds should be part of this query! List agreementItems = delegator.findByAndCache("AgreementItemAndProductAppl", UtilMisc.toMap( "productId", productId, "agreementItemTypeId", "AGREEMENT_COMMISSION")); @@ -117,6 +118,8 @@ "agreementItemTypeId", "AGREEMENT_COMMISSION")); } } + // this is not very efficient if there were many + agreementItems = EntityUtil.filterByDate(agreementItems); Iterator it = agreementItems.iterator(); while (it.hasNext()) { Modified: incubator/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/viewInvoice.fo.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/viewInvoice.fo.ftl?view=diff&rev=478318&r1=478317&r2=478318 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/viewInvoice.fo.ftl (original) +++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/viewInvoice.fo.ftl Wed Nov 22 12:49:10 2006 @@ -225,7 +225,7 @@ <fo:block text-align="right"> <#if invoiceItem.quantity?exists>${invoiceItem.quantity?string.number}</#if> </fo:block> </fo:table-cell> <fo:table-cell text-align="right"> - <fo:block> <#if invoiceItem.quantity?exists><@ofbizCurrency amount=invoiceItem.amount isoCode=invoice.currencyUomId?if_exists/></#if> </fo:block> + <fo:block> <#if invoiceItem.quantity?exists><@ofbizCurrency amount=invoiceItem.amount?if_exists isoCode=invoice.currencyUomId?if_exists/></#if> </fo:block> </fo:table-cell> <fo:table-cell text-align="right"> <fo:block> <#if invoiceItem.quantity?exists><@ofbizCurrency amount=(invoiceItem.quantity?double * invoiceItem.amount?double) isoCode=invoice.currencyUomId?if_exists/><#else><@ofbizCurrency amount=(invoiceItem.amount?double) isoCode=invoice.currencyUomId?if_exists/></#if> </fo:block> @@ -258,4 +258,4 @@ </fo:flow> </fo:page-sequence> </fo:root> -</#escape> \ No newline at end of file +</#escape> Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?view=diff&rev=478318&r1=478317&r2=478318 ============================================================================== --- incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original) +++ incubator/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Wed Nov 22 12:49:10 2006 @@ -1315,23 +1315,6 @@ </view-entity> <!-- ========================================================= --> - <!-- org.ofbiz.order.tax --> - <!-- ========================================================= --> - - <view-entity entity-name="TaxAuthorityGlAccountBalance" - package-name="org.ofbiz.order.tax" - title="For viewing balances of tax authority GL accounts"> - <member-entity entity-alias="TAGA" entity-name="TaxAuthorityGlAccount"/> - <member-entity entity-alias="GLAO" entity-name="GlAccountOrganization"/> - <alias-all entity-alias="TAGA"/> - <alias-all entity-alias="GLAO"/> - <view-link entity-alias="TAGA" rel-entity-alias="GLAO"> - <key-map field-name="glAccountId"/> - <key-map field-name="organizationPartyId"/> - </view-link> - </view-entity> - - <!-- ========================================================= --> <!-- org.ofbiz.order.opportunity --> <!-- ========================================================= --> Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java?view=diff&rev=478318&r1=478317&r2=478318 ============================================================================== --- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java (original) +++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java Wed Nov 22 12:49:10 2006 @@ -102,7 +102,8 @@ supplierProducts = EntityUtil.filterByDate(supplierProducts, UtilDateTime.nowTimestamp(), "availableFromDate", "availableThruDate", true); //sort resulting list of SupplierProduct entities by price in ASCENDING order - supplierProducts = EntityUtil.orderBy(supplierProducts, UtilMisc.toList("lastPrice ASC")); + // AceComm change: get the price of the first minOrderQty which is less than quantity, which may be the highest + supplierProducts = EntityUtil.orderBy(supplierProducts, UtilMisc.toList("minimumOrderQuantity DESC")); results = ServiceUtil.returnSuccess(); results.put("supplierProducts", supplierProducts); |
Si: it looks like a few things slipped into this commit that were not mentioned in the log, possibly some you didn't want to go into SVN like the payment.properties changes... -David On Nov 22, 2006, at 1:49 PM, [hidden email] wrote: > Author: sichen > Date: Wed Nov 22 12:49:10 2006 > New Revision: 478318 > > URL: http://svn.apache.org/viewvc?view=rev&rev=478318 > Log: > Moved an entity which should be in accounting/ and whose > entitygroup definition is in accounting/ from order to accounting > > Modified: > incubator/ofbiz/trunk/applications/accounting/config/ > payment.properties > incubator/ofbiz/trunk/applications/accounting/entitydef/ > entitymodel.xml > incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/ > accounting/invoice/InvoiceServices.xml > incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/ > accounting/agreement/AgreementServices.java > incubator/ofbiz/trunk/applications/accounting/webapp/accounting/ > invoice/viewInvoice.fo.ftl > incubator/ofbiz/trunk/applications/order/entitydef/ > entitymodel_view.xml > incubator/ofbiz/trunk/applications/product/src/org/ofbiz/ > product/supplier/SupplierProductServices.java > > Modified: incubator/ofbiz/trunk/applications/accounting/config/ > payment.properties > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/ > applications/accounting/config/payment.properties? > view=diff&rev=478318&r1=478317&r2=478318 > ====================================================================== > ======== > --- incubator/ofbiz/trunk/applications/accounting/config/ > payment.properties (original) > +++ incubator/ofbiz/trunk/applications/accounting/config/ > payment.properties Wed Nov 22 12:49:10 2006 > @@ -300,7 +300,7 @@ > # Transaction Url > #payment.authorizedotnet.url=https://secure.authorize.net/gateway/ > transact.dll > # Test Url > -payment.authorizedotnet.url=https://certification.authorize.net/ > gateway/transact.dll > +payment.authorizedotnet.url=https://test.authorize.net/gateway/ > transact.dll > > # Version - version 3.0 is currently the only supported version > for ofbiz. eventually version 3.1 may be available > payment.authorizedotnet.version=3.0 > @@ -318,7 +318,7 @@ > payment.authorizedotnet.emailcustomer=FALSE > > # Trans Key - to use version 3.1 you must register a Transaction > Key with the authorize.net > -payment.authorizedotnet.trankey= > +payment.authorizedotnet.trankey=DvWxZ96KagUJ3R99 > > # Email Merchant? - if should send email to the merchant for each > transaction > payment.authorizedotnet.emailmerchant=FALSE > @@ -330,7 +330,7 @@ > payment.authorizedotnet.relay=FALSE > > # Username - your authorize.net userid > -payment.authorizedotnet.login= > +payment.authorizedotnet.login=s5Aud9T7Y > > # Password - your authorize.net password > payment.authorizedotnet.password= > > Modified: incubator/ofbiz/trunk/applications/accounting/entitydef/ > entitymodel.xml > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/ > applications/accounting/entitydef/entitymodel.xml? > view=diff&rev=478318&r1=478317&r2=478318 > ====================================================================== > ======== > --- incubator/ofbiz/trunk/applications/accounting/entitydef/ > entitymodel.xml (original) > +++ incubator/ofbiz/trunk/applications/accounting/entitydef/ > entitymodel.xml Wed Nov 22 12:49:10 2006 > @@ -2852,6 +2852,23 @@ > <key-map field-name="glAccountId"/> > </relation> > </entity> > + <view-entity entity-name="TaxAuthorityGlAccountBalance" > + package-name="org.ofbiz.accounting.tax" > + title="For viewing balances of tax authority GL > accounts"> > + <member-entity entity-alias="TAGA" entity- > name="TaxAuthorityGlAccount"/> > + <member-entity entity-alias="GLAO" entity- > name="GlAccountOrganization"/> > + <member-entity entity-alias="PAP" entity- > name="PartyAcctgPreference"/> > + <alias-all entity-alias="TAGA"/> > + <alias-all entity-alias="GLAO"/> > + <alias entity-alias="PAP" name="baseCurrencyUomId"/> > + <view-link entity-alias="TAGA" rel-entity-alias="GLAO"> > + <key-map field-name="glAccountId"/> > + <key-map field-name="organizationPartyId"/> > + </view-link> > + <view-link entity-alias="TAGA" rel-entity-alias="PAP"> > + <key-map field-name="organizationPartyId" rel-field- > name="partyId"/> > + </view-link> > + </view-entity> > <entity entity-name="TaxAuthorityRateProduct" package- > name="org.ofbiz.accounting.tax" title="Tax Authority Rate Entity"> > <field name="taxAuthorityRateSeqId" type="id-ne"></field> > <field name="taxAuthGeoId" type="id-ne"></field> > > Modified: incubator/ofbiz/trunk/applications/accounting/script/org/ > ofbiz/accounting/invoice/InvoiceServices.xml > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/ > applications/accounting/script/org/ofbiz/accounting/invoice/ > InvoiceServices.xml?view=diff&rev=478318&r1=478317&r2=478318 > ====================================================================== > ======== > --- incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/ > accounting/invoice/InvoiceServices.xml (original) > +++ incubator/ofbiz/trunk/applications/accounting/script/org/ofbiz/ > accounting/invoice/InvoiceServices.xml Wed Nov 22 12:49:10 2006 > @@ -366,7 +366,7 @@ > <log level="info" message="Invoice not found, > invoice Id: ${invoiceId}"/> > <check-errors/> > </if-empty> > - <!-- check if the status is not Paid... --> > + <!-- if the invoice is already PAID, then set it back > to READY and clear out the paidDate --> > <if-compare field-name="invoice.statusId" > operator="equals" value="INVOICE_PAID"> > <set field="invoiceStatusMap.invoiceId" value="$ > {paymentApplication.invoiceId}" /> > <set field="invoiceStatusMap.statusId" > value="INVOICE_READY"/> > > Modified: incubator/ofbiz/trunk/applications/accounting/src/org/ > ofbiz/accounting/agreement/AgreementServices.java > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/ > applications/accounting/src/org/ofbiz/accounting/agreement/ > AgreementServices.java?view=diff&rev=478318&r1=478317&r2=478318 > ====================================================================== > ======== > --- incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/ > accounting/agreement/AgreementServices.java (original) > +++ incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/ > accounting/agreement/AgreementServices.java Wed Nov 22 12:49:10 2006 > @@ -100,8 +100,9 @@ > quantity = quantity.abs(); > String productId = (String) context.get("productId"); > String invoiceItemTypeId = (String) context.get > ("invoiceItemTypeId"); > + > // Collect agreementItems applicable to this orderItem/ > returnItem > - // Use the view entity to reduce database access and > cache to improve performance > + // TODO: partyIds should be part of this query! > List agreementItems = delegator.findByAndCache > ("AgreementItemAndProductAppl", UtilMisc.toMap( > "productId", productId, > "agreementItemTypeId", "AGREEMENT_COMMISSION")); > @@ -117,6 +118,8 @@ > "agreementItemTypeId", > "AGREEMENT_COMMISSION")); > } > } > + // this is not very efficient if there were many > + agreementItems = EntityUtil.filterByDate(agreementItems); > > Iterator it = agreementItems.iterator(); > while (it.hasNext()) { > > Modified: incubator/ofbiz/trunk/applications/accounting/webapp/ > accounting/invoice/viewInvoice.fo.ftl > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/ > applications/accounting/webapp/accounting/invoice/ > viewInvoice.fo.ftl?view=diff&rev=478318&r1=478317&r2=478318 > ====================================================================== > ======== > --- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/ > invoice/viewInvoice.fo.ftl (original) > +++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/ > invoice/viewInvoice.fo.ftl Wed Nov 22 12:49:10 2006 > @@ -225,7 +225,7 @@ > <fo:block text-align="right"> <#if > invoiceItem.quantity?exists>${invoiceItem.quantity?string.number}</ > #if> </fo:block> > </fo:table-cell> > <fo:table-cell text-align="right"> > - <fo:block> <#if > invoiceItem.quantity?exists><@ofbizCurrency > amount=invoiceItem.amount isoCode=invoice.currencyUomId?if_exists/ > ></#if> </fo:block> > + <fo:block> <#if > invoiceItem.quantity?exists><@ofbizCurrency > amount=invoiceItem.amount?if_exists isoCode=invoice.currencyUomId? > if_exists/></#if> </fo:block> > </fo:table-cell> > <fo:table-cell text-align="right"> > <fo:block> <#if > invoiceItem.quantity?exists><@ofbizCurrency amount= > (invoiceItem.quantity?double * invoiceItem.amount?double) > isoCode=invoice.currencyUomId?if_exists/><#else><@ofbizCurrency > amount=(invoiceItem.amount?double) isoCode=invoice.currencyUomId? > if_exists/></#if> </fo:block> > @@ -258,4 +258,4 @@ > </fo:flow> > </fo:page-sequence> > </fo:root> > -</#escape> > \ No newline at end of file > +</#escape> > > Modified: incubator/ofbiz/trunk/applications/order/entitydef/ > entitymodel_view.xml > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/ > applications/order/entitydef/entitymodel_view.xml? > view=diff&rev=478318&r1=478317&r2=478318 > ====================================================================== > ======== > --- incubator/ofbiz/trunk/applications/order/entitydef/ > entitymodel_view.xml (original) > +++ incubator/ofbiz/trunk/applications/order/entitydef/ > entitymodel_view.xml Wed Nov 22 12:49:10 2006 > @@ -1315,23 +1315,6 @@ > </view-entity> > > <!-- ========================================================= --> > - <!-- org.ofbiz.order.tax --> > - <!-- ========================================================= --> > - > - <view-entity entity-name="TaxAuthorityGlAccountBalance" > - package-name="org.ofbiz.order.tax" > - title="For viewing balances of tax authority GL > accounts"> > - <member-entity entity-alias="TAGA" entity- > name="TaxAuthorityGlAccount"/> > - <member-entity entity-alias="GLAO" entity- > name="GlAccountOrganization"/> > - <alias-all entity-alias="TAGA"/> > - <alias-all entity-alias="GLAO"/> > - <view-link entity-alias="TAGA" rel-entity-alias="GLAO"> > - <key-map field-name="glAccountId"/> > - <key-map field-name="organizationPartyId"/> > - </view-link> > - </view-entity> > - > - <!-- ========================================================= --> > <!-- org.ofbiz.order.opportunity --> > <!-- ========================================================= --> > > > Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/ > product/supplier/SupplierProductServices.java > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/ > applications/product/src/org/ofbiz/product/supplier/ > SupplierProductServices.java?view=diff&rev=478318&r1=478317&r2=478318 > ====================================================================== > ======== > --- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/ > product/supplier/SupplierProductServices.java (original) > +++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/ > product/supplier/SupplierProductServices.java Wed Nov 22 12:49:10 2006 > @@ -102,7 +102,8 @@ > supplierProducts = EntityUtil.filterByDate > (supplierProducts, UtilDateTime.nowTimestamp(), > "availableFromDate", "availableThruDate", true); > > //sort resulting list of SupplierProduct entities by > price in ASCENDING order > - supplierProducts = EntityUtil.orderBy > (supplierProducts, UtilMisc.toList("lastPrice ASC")); > + // AceComm change: get the price of the first > minOrderQty which is less than quantity, which may be the highest > + supplierProducts = EntityUtil.orderBy > (supplierProducts, UtilMisc.toList("minimumOrderQuantity DESC")); > > results = ServiceUtil.returnSuccess(); > results.put("supplierProducts", supplierProducts); > > |
Free forum by Nabble | Edit this page |