Friday, March 03, 2006

OFBiz Development SVN r6915

74 new commits this week. SVN r 6915 builds and installs successfully.

Significant Changes This Week:
  1. New standard costing feature, which uses data in CostComponent to calculate standard costs of raw materials, labor, production (routing) tasks, and miscellaneous. New user interface for it in catalog manager.
  2. Re-factoring of returns to create return invoices, with refunds/store credits now created as payment applications to such invoices.
  3. Ongoing development Composite Documents and composite PDF generation in the content manager.

Accounting
  • createInoiceItem now uses the parameter's price when creating a new invoice item and only calls calculateProductPrice when no price is supplied in parameters (r 6843)
  • New GL accounts for return invoice item types and purchase adjustments (r 6857)
  • New service createInvoicesFromReturnShipment to create a "Customer Return" type Invoice from a return shipment. (r 6861)
  • Added a UtilAccounting.getProductOrgGlAccountId method to determine the account ID for a given product or a fallback default account. This will replace the service getProductOrgGlAccount, which is now deprecated. This will make the code much shorter to write. (r 6863)
  • Added an AccountingException class that extends GenericServiceException. The intent of this exception is to flag serious configuraiton/data/logic errors that would make accounting impossible. (r 6863)
  • Added screens for administering company accounting preferences and setting up gl accounts. (r 6879, 6886)
  • Fixed list of payment and invoice types available on the initial screen of the accounting application. Now all possible types are shown. (r 6880)
  • Removed old payments and invoices JPublish pages which are no longer used (r 6881)
  • Fixed bug where the payment tab bar crashes for payments with no statusId (those which are only for internal recordkeeping and are not disbursements or receipts) (r 6883)
  • Fixed a couple of dead links from accountingext for viewing account details (r 6885)
  • When a return is received, an invoice for it will automatically be created and set to READY and then payment applications will be allocated. The return invoice would be closed out automatically when the Payments (either refund or store credit in BillingAccount) are issued. (r 6882, 6884, 6888, 6908)
  • InvoiceServices.java fixed some big decimal rounding issues (r 6890)
  • Fixed a small bug and added some minor enhancements to editInvoice.bsh (r 6891)
  • Improved error logging of setInvoiceStatus when an invoice could not be set to PAID: now it shows the amount discrepancy (r 6892)
  • Fixed bad column title on invoice overvie wform: InvoieWorker.getTotal was being called 'payment total' (r 6893)
  • Rearranged [Transactions] tab in Accounting appheader. (r 6895)
  • Now when payment applications are created with reference to an invoice, it will see if the amount to apply will go over the outstanding amount in the invoice. If so, it will apply only enough to satisfy the outstanding amount, leaving the rest unapplied. A warning will be logged. (r 6905)
  • Small improvements to the create/edit payment page: Made payment status a drop down, and payment method is now displayed to show type of payment method, instead of just an id (r 6906)
  • Fixed bug in copy invoice where copying an invoice with a status other than 'in process' would cause problems. (r 6914)
Base and Framework
  • New org.ofbiz.base.util.FileUtil class with writeString method which writes a string to a file at a specified location. (r 6844)
  • New UtilNumber.toPercentString method to pretty-print percentages (r 6847)
  • OfbizJsBsfEngine.java has been removed. (r 6853)
Content
  • Fixes bug where the mimeType is being set to survey, when it should be survey.response. (r 6846)
  • CompDoc UI fixes. (r 6848)
  • Changed UploadCompDocTemplateContent to UploadCompDocContent (r 6849)
  • Converted the WebSite pages from JPublish to widgets. (r 6850)
  • Fixes to ContentApproval. (r 6851)
  • Fixes and upgrades to AcroForm roundtrip code. The services for creating Surveys and SurveyResponses from acroform pdfs seems to be working. Secondary forms in the survey subwepapp section were added to do that. (r 6855, 6856)
  • CompDocScreens now dataResourceId in the session, which may be a bad practice but makes the FindCompDoc screen work. (r 6858)
  • Fixed crash in EditSurveyQuestion screen when a SurveyQuestion has no category (r 6862)
  • Cleanup of survey forms (r 6865)
  • Cleanup of PdfSurveyServices.java (r 6866)
  • PdfSurveyServices.java now uses SurveyQuestionAppl.externalFieldRef instead of SurveyQuestion.description for the fieldName (r 6867, 6872)
  • New field SurveyQuestionAppl.externalFieldRef (r 6867)
  • Refactored a lot of the screens and forms for CompDoc. (r 6869)
  • A number of improvements to the AcroForm PDF reading: creates a category and puts the questions in it; added some semi-intelligent auto-sequencing based on tab order or if no tab order then the location on the page; found something pretty good to use for question text in an annotation widget associated with each field (r 6873)
  • A refactoring of all the CompDoc parameter passing (r 6878)
  • Put a conditional call to "resequence" service in UploadContentAndImage.java (r 6889)
  • Complex PDF generation working (r 6896)
  • More ContentApproval fixes (r 6898)
  • Fix for bumping ContentApprovals. Does not count on every revision having approvals attached. (r 6910)
Entity Model
  • Added a acroFormContentId field to Survey. (r 6848, 6851)
  • New relationship from ShipmentReceipt to Shipment (r 6859)
  • New ReturnItemBilling entity to track return items which are billed to the new Return Invoices. (r 6861, 6864)
  • New field SurveyQuestionAppl.externalFieldRef (r 6867)
  • New InventoryItem.ownerPartyId and InventoryItem.currencyUomId to help track ownership and value of inventory (r 6876, 6907)
Manufacturing
  • Added seed data for two new scheduled cost services: one that initializes the products' low-level costs and the other that computes the products' costs (r 6842)
  • Modified the existing costing algorithms that automatically compute Standard Costs using the new CostComponent types. Now the ProductPrice entity is no longer used for raw materials' costs. Instead, all costs including the raw materials' cost is stored in the CostComponent entity. (r 6899)
  • Moved all the cost services from the manufacturing to the product component. (r 6900, 6901)
  • Misc improvements and bug fixes for MRP services (r 6902)
Order
  • New ReturnItemBilling entity to track return items which are billed to the new Return Invoices. (r 6861, 6864)
  • Added createReturnItemResponse service and refactored processCreditReturn and processRefundReturn to use it rather than creating ReturnItemResponses through delegator directly (r 6868)
  • Re-factored display of return items page to group return adjustments with their items (r 6870, 6874)
  • Added a service runcreatePaymentApplicationsFromReturnItemResponse to create PaymentApplications for each ReturnItemBilling of a ReturnItemResponse. Refactored code so that this service is called at the same time that ReturnHeader is updated to RECEIVED satus as triggered by a shipment receipt. This allows the return item billings and invoices to be created before processCreditReturn and processRefundReturn. (r 6871)
  • Fixed return total > order total error message. (r 6875)
  • The status of the Payment for credit returns is now set to PMNT_CONFIRMED instead of left null (r 6887)
  • Fixed problem with quick refund where balance adjustment only being created when order total > return total. Now will create a balance adjustment of any amount to round things out for quick refunded returns. Should reduce rounding-related errors for quick-refunding returns (r 6894)
  • Improved some log comments in order return services. (r 6902)
  • Fixed bug in returnHeader.bsh where the orderRoles are being filtered by date when the entity has no dates to filter by, and a typo. (r 6909)
  • New Simplified Chinese translations (r 6911)
Product
  • Replaced duplicate inventory by items report with the lookup already in facility manager (r 6845)
  • Now the "view inventory by product" html report is the page that is shown when you click on the Facility--> inventory tab. The "Inventory Items" page is still available as a detail page following the link in the "view inventory by product" page. (r 6852)
  • Added a SECA to create the return invoices when a sales return is received. In order for this to work, the SECA has to know the type of shipment that was updated, so the service updateShipment was modified to return the shipmentTypeId. (r 6860)
  • New InventoryItem.ownerPartyId and InventoryItem.currencyUomId to help track ownership and value of inventory (r 6876, 6907)
  • When receiving inventory, ownership and currency are stored. A currency conversion is done from the currency of the Purchase Order to the currency of the warehouse's default owner. You can change the value and currency if it needs to be different. (r 6876, 6912, 6913)
  • New services and ui to manage CostComponents of Products (r 6877)
  • Now there are four types of CostComponents: EST_STD_MAT_COST, the estimated standard cost for the materials; EST_STD_ROUTE_COST, the estimated standard cost for the fixed asset usage (based on routing definition); EST_STD_LABOR_COST, the estimated standard cost for the employee labor; EST_STD_OTHER_COST, estimated standard cost for other factors (r 6899)
  • Modified the existing costing algorithms that automatically compute Standard Costs using the new CostComponent types. Now the ProductPrice entity is no longer used for raw materials' costs. Instead, all costs including the raw materials' cost is stored in the CostComponent entity. (r 6899)
  • Moved all the cost services from the manufacturing to the product component. (r 6900, 6901)
  • The EditProductSuppliers screen now uses the default currency define in general.properties for its default currency (r 6915)
Seed Data
  • Added seed data for two new scheduled cost services: one that initializes the products' low-level costs and the other that computes the products' costs (r 6842)
  • New GL accounts for return invoice item types and purchase adjustments (r 6857)
  • Now there are four types of CostComponents: EST_STD_MAT_COST, the estimated standard cost for the materials; EST_STD_ROUTE_COST, the estimated standard cost for the fixed asset usage (based on routing definition); EST_STD_LABOR_COST, the estimated standard cost for the employee labor; EST_STD_OTHER_COST, estimated standard cost for other factors (r 6899)
  • Added demo data file to for standard costing. (r 6904)