[OFBiz] SVN: r6090 - in trunk/specialized/opentravelsystem/webapp/hotelbackend: . WEB-INF includes screens script

hansbak at svn.ofbiz.org hansbak at svn.ofbiz.org
Tue Nov 8 07:51:35 EST 2005


Author: hansbak
Date: 2005-11-08 06:51:07 -0600 (Tue, 08 Nov 2005)
New Revision: 6090

Added:
   trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/Menus.xml
   trunk/specialized/opentravelsystem/webapp/hotelbackend/script/
   trunk/specialized/opentravelsystem/webapp/hotelbackend/script/ListInvoices.bsh
Modified:
   trunk/specialized/opentravelsystem/webapp/hotelbackend/WEB-INF/controller.xml
   trunk/specialized/opentravelsystem/webapp/hotelbackend/includes/header.ftl
   trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/CommonScreens.xml
   trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/PartyForms.xml
   trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/PartyScreens.xml
Log:
more faultfixing opentravelsystem

Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/WEB-INF/controller.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/WEB-INF/controller.xml	2005-11-07 21:42:28 UTC (rev 6089)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/WEB-INF/controller.xml	2005-11-08 12:51:07 UTC (rev 6090)
@@ -290,7 +290,76 @@
     <request-map uri="OrderPurchaseReportProduct.pdf"><security https="true" auth="true"/>
         <response name="success" type="view" value="OrderPurchaseReportProduct"/>
     </request-map>
+
+    <!--============= edit/create parties ================-->    
+    <request-map uri="createnew"><security https="true" auth="true"/><response name="success" type="view" value="CreateNewParty"/></request-map>
     
+    <request-map uri="NewCustomer"><security https="true" auth="true"/><response name="success" type="view" value="NewCustomer"/></request-map>
+    <request-map uri="createCustomer">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/party/user/UserEvents.xml" invoke="createCustomer"/>
+        <response name="success" type="view" value="viewprofile"/>
+        <response name="error" type="view" value="NewCustomer"/>
+    </request-map>
+    
+    <request-map uri="NewProspect"><security https="true" auth="true"/><response name="success" type="view" value="NewProspect"/></request-map>
+    <request-map uri="createProspect">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/party/user/UserEvents.xml" invoke="createProspect"/>
+        <response name="success" type="view" value="viewprofile"/>
+        <response name="error" type="view" value="NewProspect"/>
+    </request-map>
+    
+    <request-map uri="NewEmployee"><security https="true" auth="true"/><response name="success" type="view" value="NewEmployee"/></request-map>
+    <request-map uri="createEmployee">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/party/user/UserEvents.xml" invoke="createEmployee"/>
+        <response name="success" type="view" value="viewprofile"/>
+        <response name="error" type="view" value="NewEmployee"/>
+    </request-map>
+    
+    <request-map uri="editperson"><security https="true" auth="true"/><response name="success" type="view" value="EditPerson"/></request-map>
+    <request-map uri="createPerson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createPerson"/>
+        <response name="success" type="view" value="EditPerson"/>
+        <response name="error" type="view" value="EditPerson"/>
+    </request-map>
+    <request-map uri="updatePerson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updatePerson"/>
+        <response name="success" type="view" value="EditPerson"/>
+        <response name="error" type="view" value="EditPerson"/>
+    </request-map>
+    
+    <request-map uri="editpartygroup"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyGroup"/></request-map>
+    <request-map uri="createPartyGroup">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createPartyGroup"/>
+        <response name="success" type="view" value="EditPartyGroup"/>
+        <response name="error" type="view" value="EditPartyGroup"/>
+    </request-map>
+    <request-map uri="updatePartyGroup">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updatePartyGroup"/>
+        <response name="success" type="view" value="EditPartyGroup"/>
+        <response name="error" type="view" value="EditPartyGroup"/>
+    </request-map>
+    
+    <request-map uri="viewvendor"><security https="true" auth="true"/><response name="success" type="view" value="viewvendor"/></request-map>
+    <request-map uri="createVendor">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createVendor"/>
+        <response name="success" type="view" value="viewvendor"/>
+        <response name="error" type="view" value="viewvendor"/>
+    </request-map>
+    <request-map uri="updateVendor">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updateVendor"/>
+        <response name="success" type="view" value="viewvendor"/>
+        <response name="error" type="view" value="viewvendor"/>
+    </request-map>
+
     <!-- ================ Partys ================= -->
     <request-map uri="findParties">
         <security https="true" auth="true"/>
@@ -313,10 +382,88 @@
         <response name="success" type="view" value="listSalesInvoices"/>
     </request-map>
     
-    <request-map uri="viewprofile">
+    <request-map uri="viewprofile"><security https="true" auth="true"/><response name="success" type="view" value="viewprofile"/></request-map>
+    <request-map uri="viewroles"><security https="true" auth="true"/><response name="success" type="view" value="viewroles"/></request-map>
+    
+    <request-map uri="editcontactmech"><security https="true" auth="true"/><response name="success" type="view" value="editcontactmech"/></request-map>
+    <request-map uri="createContactMech">
         <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyContactMech"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    <request-map uri="updateContactMech">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePartyContactMech"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    <request-map uri="deleteContactMech">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deletePartyContactMech"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    
+    <request-map uri="createPostalAddressAndPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyPostalAddress"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    
+    <request-map uri="createPostalAddress">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyPostalAddress"/>
         <response name="success" type="view" value="viewprofile"/>
+        <response name="error" type="view" value="editcontactmech"/>
     </request-map>
+    <request-map uri="updatePostalAddress">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePartyPostalAddress"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    
+    <request-map uri="createTelecomNumber">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyTelecomNumber"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    <request-map uri="updateTelecomNumber">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePartyTelecomNumber"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    
+    <request-map uri="createEmailAddress">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyEmailAddress"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    <request-map uri="updateEmailAddress">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePartyEmailAddress"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    
+    <request-map uri="createPartyContactMechPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyContactMechPurpose"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    <request-map uri="deletePartyContactMechPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deletePartyContactMechPurpose"/>
+        <response name="success" type="view" value="editcontactmech"/>
+        <response name="error" type="view" value="editcontactmech"/>
+    </request-map>
+    
 
     <request-map uri="visitdetail">
         <security https="true" auth="true"/>
@@ -340,8 +487,129 @@
         <response name="success" type="view" value="findordersCust"/>
     </request-map>
 
+    <!-- communication event requests -->
+    <request-map uri="FindCommunicationEvents"><security https="true" auth="true"/><response name="success" type="view" value="FindCommunicationEvents"/></request-map>
+    <request-map uri="PendingCommunications"><security https="true" auth="true"/><response name="success" type="view" value="PendingCommunications"/></request-map>
+    <request-map uri="EditCommunicationEvent"><security https="true" auth="true"/><response name="success" type="view" value="EditCommunicationEvent"/></request-map>
+    <request-map uri="ViewCommunicationEvent"><security https="true" auth="true"/><response name="success" type="view" value="ViewCommunicationEvent"/></request-map>
     
-
+    <request-map uri="EditCommunication"><security https="true" auth="true"/><response name="success" type="view" value="EditCommunicationEvent"/></request-map>
+    <request-map uri="createCommunicationEvent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createCommunicationEvent"/>
+        <response name="success" type="view" value="EditCommunicationEvent"/>
+        <response name="success" type="view" value="EditCommunicationEvent"/>
+    </request-map>
+    <request-map uri="updateCommunicationEvent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateCommunicationEvent"/>
+        <response name="success" type="view" value="EditCommunicationEvent"/>
+        <response name="success" type="view" value="EditCommunicationEvent"/>
+    </request-map>
+    <request-map uri="deleteCommunicationEvent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteCommunicationEvent"/>
+        <response name="success" type="view" value="ListLookupCommEvents"/>
+        <response name="success" type="view" value="ListLookupCommEvents"/>
+    </request-map>
+    
+    <request-map uri="deletePartyCommunicationEvent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteCommunicationEvent"/>
+        <response name="success" type="view" value="ListPartyCommEvents"/>
+        <response name="success" type="view" value="ListPartyCommEvents"/>
+    </request-map>
+    
+    <request-map uri="UpdateCommPurposes"><security https="true" auth="true"/><response name="success" type="view" value="UpdateCommPurposes"/></request-map>
+    <request-map uri="createCommunicationEventPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createCommunicationEventPurpose"/>
+        <response name="success" type="view" value="UpdateCommPurposes"/>
+        <response name="success" type="view" value="UpdateCommPurposes"/>
+    </request-map>
+    <request-map uri="removeCommunicationEventPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="removeCommunicationEventPurpose"/>
+        <response name="success" type="view" value="UpdateCommPurposes"/>
+        <response name="success" type="view" value="UpdateCommPurposes"/>
+    </request-map>
+    
+    <request-map uri="UpdateCommRoles"><security https="true" auth="true"/><response name="success" type="view" value="UpdateCommRoles"/></request-map>
+    <request-map uri="createCommunicationEventRole">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createCommunicationEventRole"/>
+        <response name="success" type="view" value="UpdateCommRoles"/>
+        <response name="success" type="view" value="UpdateCommRoles"/>
+    </request-map>
+    <request-map uri="RemoveCommunicationEventRole">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="removeCommunicationEventRole"/>
+        <response name="success" type="view" value="UpdateCommRoles"/>
+        <response name="success" type="view" value="UpdateCommRoles"/>
+    </request-map>
+    
+    <request-map uri="ListPartyCommEvents"><security https="true" auth="true"/><response name="success" type="view" value="ListPartyCommEvents"/></request-map>
+    <request-map uri="ListLookupCommEvents"><security https="true" auth="true"/><response name="success" type="view" value="ListLookupCommEvents"/></request-map>
+    <request-map uri="ListCommCustRequests"><security https="true" auth="true"/><response name="success" type="view" value="ListCommCustRequests"/></request-map>
+    
+    <!-- ===============   TAX  ======================== -->
+    <request-map uri="EditPartyTaxInfos"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyTaxInfos"/></request-map>
+    <request-map uri="createPartyTaxInfo">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createPartyTaxInfo"/>
+        <response name="success" type="view" value="EditPartyTaxInfos"/>
+        <response name="error" type="view" value="EditPartyTaxInfos"/>
+    </request-map>
+    <request-map uri="updatePartyTaxInfo">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updatePartyTaxInfo"/>
+        <response name="success" type="view" value="EditPartyTaxInfos"/>
+        <response name="error" type="view" value="EditPartyTaxInfos"/>
+    </request-map>
+    <request-map uri="deletePartyTaxInfo">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="deletePartyTaxInfo"/>
+        <response name="success" type="view" value="EditPartyTaxInfos"/>
+        <response name="error" type="view" value="EditPartyTaxInfos"/>
+    </request-map>
+    
+    <!-- ================ party rates ===================== -->
+    <request-map uri="EditPartyRates"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyRates"/></request-map>
+    <request-map uri="createPartyRate">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyRate"/>
+        <response name="success" type="view" value="EditPartyRates"/>
+        <response name="error" type="view" value="EditPartyRates"/>
+    </request-map>
+    <request-map uri="updatePartyRate">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePartyRate"/>
+        <response name="success" type="view" value="EditPartyRates"/>
+        <response name="error" type="view" value="EditPartyRates"/>
+    </request-map>
+    <request-map uri="deletePartyRate">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deletePartyRate"/>
+        <response name="success" type="view" value="EditPartyRates"/>
+        <response name="error" type="view" value="EditPartyRates"/>
+    </request-map>
+    
+    <!-- ================ contact lists ================== -->
+    <!-- ContactList request mappings -->
+    <request-map uri="ListPartyContactLists"><security https="true" auth="true"/><response name="success" type="view" value="ListPartyContactLists"/></request-map>
+    <request-map uri="createContactListParty">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createContactListParty"/>
+        <response name="success" type="view" value="ListPartyContactLists"/>
+        <response name="error" type="view" value="ListPartyContactLists"/>
+    </request-map>
+    <request-map uri="updateContactListParty">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updateContactListParty"/>
+        <response name="success" type="view" value="ListPartyContactLists"/>
+        <response name="error" type="view" value="ListPartyContactLists"/>
+    </request-map>
+    
     <!-- ================ Misc. Requests ================= -->
     <request-map uri="FastLoadCache">
         <security https="true" auth="true"/>
@@ -2699,8 +2967,76 @@
     <view-map name="listSalesInvoices" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/PartyScreens.xml#listSalesInvoices"/>
     <view-map name="listPurchaseInvoices" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/PartyScreens.xml#listPurchaseInvoices"/>
     <view-map name="viewprofile" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#viewprofile"/>
-    <view-map name="visitdetail" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/PartyScreens.xml#visitdetail"/>
+    <view-map name="viewroles" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#viewroles"/>
+    <view-map name="EditPartyRelationships" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditPartyRelationships"/>
+    <view-map name="viewvendor" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#viewvendor"/>
+    <view-map name="EditPartyTaxInfos" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditPartyTaxInfos"/>
+    <view-map name="editShoppingList" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#editShoppingList"/>
+    
+    <view-map name="EditPerson" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditPerson"/>
+    <view-map name="EditPartyGroup" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditPartyGroup"/>
+    <view-map name="EditUserLogin" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditUserLogin"/>
+    <view-map name="createnewlogin" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#CreateUserLogin"/>
+    <view-map name="EditUserLoginSecurityGroups" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditUserLoginSecurityGroups"/>
+    <view-map name="AddPartyNote" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#AddPartyNote"/>
+    <view-map name="ViewSegmentRoles" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#ViewSegmentRoles"/>
+    <view-map name="ListPartyContactLists" type="screen" page="component://party/widget/partymgr/PartyContactListScreens.xml#ListPartyContactLists"/>
+    <view-map name="EditPartyRates" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditPartyRates"/>
+    
+    <view-map name="editcontactmech" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#editcontactmech"/>
+    <view-map name="editcreditcard" type="screen" page="component://party/widget/partymgr/PaymentMethodScreens.xml#editcreditcard"/>
+    <view-map name="editgiftcard" type="screen" page="component://party/widget/partymgr/PaymentMethodScreens.xml#editgiftcard"/>
+    <view-map name="editeftaccount" type="screen" page="component://party/widget/partymgr/PaymentMethodScreens.xml#editeftaccount"/>
+    <view-map name="editavsoverride" type="screen" page="component://party/widget/partymgr/PaymentMethodScreens.xml#editavsoverride"/>
+    
+    <view-map name="PendingCommunications" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#PendingCommunications"/>
+    <view-map name="ListPartyCommEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListPartyCommEvents"/>
+    <view-map name="ListLookupCommEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListLookupCommEvents"/>
+    <view-map name="FindCommunicationEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#FindCommunicationEvents"/>
+    <view-map name="EditCommunicationEvent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommunicationEvent"/>
+    <view-map name="ViewCommunicationEvent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ViewCommunicationEvent"/>
+    <view-map name="UpdateCommPurposes" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#UpdateCommPurposes"/>
+    <view-map name="UpdateCommRoles" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#UpdateCommRoles"/>
+    <view-map name="EditCommWorkEffort" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommWorkEffort"/>
+    <view-map name="EditCommCustRequest" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommCustRequest"/>
+    <view-map name="ListCommCustRequests" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListCommCustRequests"/>
+    <view-map name="ListCommWorkEfforts" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListCommWorkEfforts"/>
+    <view-map name="AddCommEventWorkEffort" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#AddCommEventWorkEffort"/>
+    <view-map name="EditCommEventWorkEffort" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommEventWorkEffort"/>
+    
+    <view-map name="EditPartyTaxInfos" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditPartyTaxInfos"/>
+
+    <view-map name="EditPartyRates" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#EditPartyRates"/>
+    
+    <view-map name="CreateNewParty" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#CreateNewParty"/>
+    <view-map name="NewCustomer" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#NewCustomer"/>
+    <view-map name="NewProspect" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#NewProspect"/>
+    <view-map name="NewEmployee" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#NewEmployee"/>
+    
+    <view-map name="EditPartyClassifications" type="screen" page="component://party/widget/partymgr/PartyClassificationScreens.xml#EditPartyClassifications"/>
+    <view-map name="EditPartyClassificationGroupParties" type="screen" page="component://party/widget/partymgr/PartyClassificationScreens.xml#EditPartyClassificationGroupParties"/>
+    <view-map name="FindPartyClassificationGroups" type="screen" page="component://party/widget/partymgr/PartyClassificationScreens.xml#FindPartyClassificationGroups"/>
+    <view-map name="EditPartyClassificationGroup" type="screen" page="component://party/widget/partymgr/PartyClassificationScreens.xml#EditPartyClassificationGroup"/>
+        
+    <view-map name="showvisits" type="screen" page="component://party/widget/partymgr/VisitScreens.xml#showvisits"/>
+    <view-map name="visitdetail" type="screen" page="component://party/widget/partymgr/VisitScreens.xml#visitdetail"/>
     <view-map name="findordersCust" type="screen" page="component://opentravelsystem/webapp/hotelbackend/screens/PartyScreens.xml#findordersCust"/>
+    <!-- communication events -->
+    <view-map name="PendingCommunications" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#PendingCommunications"/>
+    <view-map name="ListPartyCommEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListPartyCommEvents"/>
+    <view-map name="ListLookupCommEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListLookupCommEvents"/>
+    <view-map name="FindCommunicationEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#FindCommunicationEvents"/>
+    <view-map name="EditCommunicationEvent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommunicationEvent"/>
+    <view-map name="ViewCommunicationEvent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ViewCommunicationEvent"/>
+    <view-map name="UpdateCommPurposes" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#UpdateCommPurposes"/>
+    <view-map name="UpdateCommRoles" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#UpdateCommRoles"/>
+    <view-map name="EditCommWorkEffort" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommWorkEffort"/>
+    <view-map name="EditCommCustRequest" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommCustRequest"/>
+    <view-map name="ListCommCustRequests" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListCommCustRequests"/>
+    <view-map name="ListCommWorkEfforts" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListCommWorkEfforts"/>
+    <view-map name="AddCommEventWorkEffort" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#AddCommEventWorkEffort"/>
+    <view-map name="EditCommEventWorkEffort" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommEventWorkEffort"/>
+    
     <!--display by the frontend -->
     <view-map name="product" type="screen" page="component://opentravelsystem/webapp/hotelfrontend/screens/CatalogScreens.xml#product"/>
     

Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/includes/header.ftl
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/includes/header.ftl	2005-11-07 21:42:28 UTC (rev 6089)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/includes/header.ftl	2005-11-08 12:51:07 UTC (rev 6090)
@@ -47,6 +47,7 @@
 </head>
 
 <body>
+<#if !parameters.popup?exists>
 <table border="0" width='100%' cellspacing='0' cellpadding='0' class='headerboxoutside'>
   <tr>
     <td width='100%'>
@@ -85,4 +86,5 @@
     </td>
   </tr>
 </table>
+</#if>
 

Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/CommonScreens.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/CommonScreens.xml	2005-11-07 21:42:28 UTC (rev 6089)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/CommonScreens.xml	2005-11-08 12:51:07 UTC (rev 6090)
@@ -26,7 +26,7 @@
 <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd">
 
-<!-- Top level decorator taking care of header and main tab bar.... -->
+    <!-- Top level decorator taking care of header and main tab bar.... -->
     <screen name="main-decorator">
         <section>
             <actions>
@@ -57,46 +57,24 @@
             <widgets>
                 <!-- render header -->
                 <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/includes/header.ftl"/></html></platform-specific>
-                <!-- render appbar -->
-                <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/includes/appbar.ftl"/></html></platform-specific>
-                
-                            <decorator-section-include name="body"/>
-                
+                <section>
+                    <condition>
+                        <if-empty field-name="parameters.popup"/>
+                    </condition>
+                    <widgets>
+                        <!-- render appbar -->
+                        <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/includes/appbar.ftl"/></html></platform-specific>
+                    </widgets>
+                </section>
+                <decorator-section-include name="body"/>
                 <!-- render footer -->
                 <platform-specific><html><html-template location="component://opentravelsystem/includes/footer.ftl"/></html></platform-specific>
             </widgets>
         </section>
     </screen>
+    
+<!--  second level decorator  for each tab like product, customer etc -->
 
-<!--  second level decorator  for each tab like product, customeretc -->
-
-<!-- setting is moved a level deeper.. -->
-    <!--screen name="SettingsDecorator">
-        <section>
-            <actions>
-                <set field="page.appTabButtonItem" value="Settings"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="main-decorator">
-                    <decorator-section name="body">
-                        
-                        <container style="centerarea">
-                            <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/settings/appheaderSettings.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>
-                                    <decorator-section-include name="body"/>
-                                </container>
-                                <container style="endcolumns"><label text="&amp;nbsp;"/></container>
-                            </container>
-                        </container>
-                        
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen-->
-
     <screen name="CatalogDecorator">
         <section>
             <actions>
@@ -132,13 +110,31 @@
             <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>
+                            <section>
+                                <condition>
+                                    <if-empty field-name="parameters.popup"/>
+                                </condition>
+                                <widgets>
+                                    <platform-specific><html><html-template location="component://opentravelsystem/webapp/hotelbackend/party/appheaderCustomer.ftl"/></html></platform-specific>
+                                </widgets>
+                                <fail-widgets>
+                                    <container>
+                                        <label style="head1">Party Information for: ${person.firstName} ${person.lastName}${partyGroup.groupName} [${partyId}]</label>
+                                    </container>
+                                </fail-widgets>
+                            </section>
                             <container style="contentarea">
                                 <container style="${MainColumnStyle}">
                                     <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific>
-                                    <include-menu location="component://party/widget/partymgr/PartyMenus.xml" name="ProfileTabBar"/>
+                                    <section>
+                                        <condition>
+                                            <if-compare field-name="partyId" operator="not-equals" value=""/>
+                                        </condition>
+                                        <widgets>
+                                            <include-menu location="component://opentravelsystem/webapp/hotelbackend/screens/Menus.xml" name="PartyTabBar"/>
+                                        </widgets>
+                                    </section>
                                     <decorator-section-include name="body"/>
                                 </container>
                                 <container style="endcolumns"><label text="&amp;nbsp;"/></container>
@@ -151,6 +147,7 @@
             </widgets>
         </section>
     </screen>
+    
     <screen name="ReservationsDecorator">
         <section>
             <actions>
@@ -204,8 +201,6 @@
             </widgets>
         </section>
     </screen>
-    
-    
 
 <!-- Lowest level decorators for fixes asset, productstore etc..... -->
     <screen name="CommonProductStoreDecorator">

Added: trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/Menus.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/Menus.xml	2005-11-07 21:42:28 UTC (rev 6089)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/Menus.xml	2005-11-08 12:51:07 UTC (rev 6090)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *  Copyright (c) 2004-2005 The Open For Business Project - www.ofbiz.org
+ *
+ *  Permission is hereby granted, free of charge, to any person obtaining a
+ *  copy of this software and associated documentation files (the "Software"),
+ *  to deal in the Software without restriction, including without limitation
+ *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ *  and/or sell copies of the Software, and to permit persons to whom the
+ *  Software is furnished to do so, subject to the following conditions:
+ *
+ *  The above copyright notice and this permission notice shall be included
+ *  in all copies or substantial portions of the Software.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *  $Id: ProductScreens.xml 4990 2005-05-14 10:00:28Z jacopo $
+-->
+<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-menu.xsd">
+    <menu name="PartyTabBar" default-menu-item-name="viewprofile" default-selected-style="tabButtonSelected" 
+        default-title-style="tabButton" default-tooltip-style="tabletext" default-widget-style="tabButton" 
+        orientation="horizontal" type="simple">
+        <menu-item name="viewprofile" title="${uiLabelMap.PartyProfile}">
+            <link target="viewprofile?partyId=${partyId}"/>
+        </menu-item>
+        <menu-item name="viewroles" title="${uiLabelMap.PartyRoles}">
+            <link target="viewroles?partyId=${partyId}"/>
+        </menu-item>
+        <!--menu-item name="EditPartyRelationships" title="${uiLabelMap.PartyRelationships}">
+            <link target="EditPartyRelationships?partyId=${partyId}"/>
+        </menu-item-->
+        <menu-item name="PartyCommEvents" title="${uiLabelMap.PartyCommunications}" >
+            <link target="ListPartyCommEvents?partyId=${partyId}"/>
+        </menu-item>
+        <!--menu-item name="viewvendor" title="${uiLabelMap.PartyVendor}">
+            <link target="viewvendor?partyId=${partyId}"/>
+        </menu-item-->
+        <menu-item name="EditPartyTaxInfos" title="${uiLabelMap.PartyTaxInfos}">
+            <link target="EditPartyTaxInfos?partyId=${partyId}"/>
+        </menu-item>
+        <menu-item name="EditPartyRates" title="${uiLabelMap.CommonRates}">
+            <link target="EditPartyRates?partyId=${partyId}"/>
+        </menu-item>
+        <!--menu-item name="editShoppingList" title="${uiLabelMap.PartyShoppingLists}">
+            <link target="editShoppingList?partyId=${partyId}"/>
+        </menu-item-->
+        <!--menu-item name="ViewSegmentRoles" title="${uiLabelMap.PartySegments}">
+            <link target="ViewSegmentRoles?partyId=${partyId}"/>
+        </menu-item-->
+        <!--menu-item name="EditPartyClassifications" title="${uiLabelMap.PartyClassifications}">
+            <link target="EditPartyClassifications?partyId=${partyId}"/>
+        </menu-item-->
+        <menu-item name="ContactList" title="${uiLabelMap.PartyContactList}">
+            <link target="ListPartyContactLists?partyId=${partyId}"/>
+        </menu-item>
+    </menu>
+</menus>

Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/PartyForms.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/PartyForms.xml	2005-11-07 21:42:28 UTC (rev 6089)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/PartyForms.xml	2005-11-08 12:51:07 UTC (rev 6090)
@@ -34,7 +34,7 @@
             </service>
         </actions>
         <field name="partyId" widget-style="buttontext" >
-            <hyperlink description="${partyId}" target="viewprofile?partyId=${partyId}" target-window="new"/>
+            <hyperlink description="${partyId}" target="viewprofile?popup=yes&amp;partyId=${partyId}" target-window="new"/>
         </field>
         <field name="partyRelationshipTypeId" title="Relation"><display/></field>
         <field name="groupName" title="Name"><display description="${groupName} ${lastName} ${firstName} ${middleName}"/></field>

Modified: trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/PartyScreens.xml
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/PartyScreens.xml	2005-11-07 21:42:28 UTC (rev 6089)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/screens/PartyScreens.xml	2005-11-08 12:51:07 UTC (rev 6090)
@@ -124,98 +124,4 @@
             </widgets>
         </section>
     </screen>
-    <screen name="main"><!-- list customers... -->
-        <section>
-            <actions>
-                <set field="page.appTabButtonItem" value="Parties"/>
-                <set field="page.headerItem" value="main"/>
-                <set field="productStoreId" from-scope="user" from-field="productStoreId"/>
-                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
-                <entity-condition entity-name="CustomerSummary" list-name="customers">
-                        <condition-expr field-name="productStoreId" operator="equals"  env-name="productStoreId"/>
-                </entity-condition>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                            <label style="head1">List of customers who placed an order.&lt;br&gt;</label>
-                        <include-form name="ListCustomers" location="component://opentravelsystem/webapp/hotelbackend/screens/PartyForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="viewprofile">
-        <section>
-            <actions>
-                <set field="page.appTabButtonItem" value="Parties"/>
-                <set field="page.headerItem" value="main"/>
-                <set field="productStoreId" from-scope="user" from-field="productStoreId"/>
-                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/viewprofile.bsh"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <container>
-                            <platform-specific>
-                                <html>
-                                    <html-template location="component://opentravelsystem/webapp/hotelbackend/party/viewprofile.ftl"/>
-                                </html>
-                            </platform-specific>
-                        </container>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="visitdetail">
-        <section>
-            <actions>
-                <set field="page.appTabButtonItem" value="Parties"/>
-                <set field="page.headerItem" value="main"/>
-                <set field="productStoreId" from-scope="user" from-field="productStoreId"/>
-                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/visit/visitdetail.bsh"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonPartyDecorator">
-                    <decorator-section name="body">
-                        <container>
-                            <platform-specific>
-                                <html>
-                                    <html-template location="component://party/webapp/partymgr/visit/visitdetail.ftl"/>
-                                </html>
-                            </platform-specific>
-                        </container>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    
-    <screen name="findordersCust">
-        <section>
-            <actions>
-                <set field="page.appTabButtonItem" value="Parties"/>
-                <set field="page.headerItem" value="main"/>
-                <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
-                <set field="productStoreId" from-scope="user" from-field="productStoreId"/>
-                <set field="productStoreId" to-scope="user" value="${productStoreId}"/>
-                <script location="component://opentravelsystem/webapp/hotelbackend/WEB-INF/actions/order/findOrders.bsh"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonPartyDecorator">
-                    <decorator-section name="body">
-                        <platform-specific>
-                            <html>
-                                <html-template location="component://opentravelsystem/webapp/hotelbackend/order/findOrders.ftl"/>
-                            </html>
-                        </platform-specific>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    
 </screens>

Added: trunk/specialized/opentravelsystem/webapp/hotelbackend/script/ListInvoices.bsh
===================================================================
--- trunk/specialized/opentravelsystem/webapp/hotelbackend/script/ListInvoices.bsh	2005-11-07 21:42:28 UTC (rev 6089)
+++ trunk/specialized/opentravelsystem/webapp/hotelbackend/script/ListInvoices.bsh	2005-11-08 12:51:07 UTC (rev 6090)
@@ -0,0 +1,179 @@
+/*
+ *  Copyright (c) 2001-2005 The Open For Business Project - www.ofbiz.org
+ *
+ *  Permission is hereby granted, free of charge, to any person obtaining a
+ *  copy of this software and associated documentation files (the "Software"),
+ *  to deal in the Software without restriction, including without limitation
+ *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ *  and/or sell copies of the Software, and to permit persons to whom the
+ *  Software is furnished to do so, subject to the following conditions:
+ *
+ *  The above copyright notice and this permission notice shall be included
+ *  in all copies or substantial portions of the Software.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *@author     Andy Zeneski (jaz at ofbiz.org)
+ *@version    $Rev: 5462 $
+ *@since      3.0
+ */
+
+import java.util.*;
+import java.math.*;
+import java.sql.Timestamp;
+import org.ofbiz.base.util.*;
+import org.ofbiz.entity.*;
+import org.ofbiz.securityext.login.*;
+import org.ofbiz.common.*;
+import org.ofbiz.webapp.control.*;
+import org.ofbiz.accounting.invoice.*;
+
+delegator = parameters.get("delegator");
+organizationPartyId = parameters.get("organizationPartyId");
+
+// Create totals:
+BigDecimal salesTaxInTot = new BigDecimal("0");
+BigDecimal salesTaxOutTot = new BigDecimal("0");
+BigDecimal revenueTot = new BigDecimal("0");
+BigDecimal expensesTot = new BigDecimal("0");
+BigDecimal MiscInTot = new BigDecimal("0");
+BigDecimal MiscOutTot = new BigDecimal("0");
+BigDecimal totalValueTot = new BigDecimal("0");
+
+// first get the list of companies
+List invoiceList = new LinkedList();
+
+
+/*
+// check companies who have invoices from/to thye organizationParty but no relation
+
+parties = delegator.findAll("Party");
+Iterator p = parties.iterator();
+while (p.hasNext())	{
+	party = p.next();
+	List rel = delegator.findByAnd("PartyRelationship",UtilMisc.toMap("partyIdTo",party.getString("partyId")));
+	if (rel == null || rel.size() == 0)	{
+		invoices = delegator.findByAnd("Invoice",UtilMisc.toMap("partyIdFrom",party.getString("partyId")));
+		if (invoices != null && invoices.size() != 0) Debug.logInfo("!!!!!!!!!!(partyIdFrom)" + party.getString("partyId") + " InvoiceId:" + invoices.get(0).getString("invoiceId"),"???????");
+		invoices = delegator.findByAnd("Invoice",UtilMisc.toMap("partyId",party.getString("partyId")));
+		if (invoices != null  && invoices.size() != 0) Debug.logInfo("!!!!!!!!!!(party)" + party.getString("partyId") + " InvoiceId:" + invoices.get(0).getString("invoiceId"),"???????");
+	}
+}
+*/
+companies = delegator.findByAnd("PartyRelationshipAndPartyDetail",UtilMisc.toMap("partyIdFrom",organizationPartyId));
+Iterator comp = companies.iterator();
+while (comp.hasNext())	{
+	company = comp.next();
+	partyId = company.getString("partyId");
+	name = company.getString("groupName");
+	if (name == null) 	{
+		if (company.getString("lastName") != null)	{
+			name = company.getString("lastName");
+			if (company.getString("firstName") != null)	{
+				name = name.concat(", ").concat(company.getString("lastName"));
+			}
+		}
+	}
+	BigDecimal salesTaxIn = new BigDecimal("0");
+	BigDecimal salesTaxOut = new BigDecimal("0");
+	BigDecimal revenue = new BigDecimal("0");
+	BigDecimal expenses = new BigDecimal("0");
+	BigDecimal MiscIn = new BigDecimal("0");
+	BigDecimal MiscOut = new BigDecimal("0");
+	BigDecimal totalValue = new BigDecimal("0");
+
+	// purchase invoices
+	invoices = delegator.findByAnd("Invoice",UtilMisc.toMap("partyIdFrom",partyId));
+	Iterator inv = invoices.iterator();
+	while (inv.hasNext())	{
+		invoice = inv.next();
+		if (invoice.getString("statusId").equals("INVOICE_CANCELLED")) continue;
+
+		invoiceItems = invoice.getRelated("InvoiceItem");
+		Iterator invit = invoiceItems.iterator();
+		while (invit.hasNext())	{
+			invoiceItem = invit.next();
+			if (invoiceItem.getString("invoiceItemTypeId").equals("PINV_SALES_TAX"))	{
+				salesTaxOut = salesTaxOut.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+				salesTaxOutTot = salesTaxOutTot.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+			}
+			else if (invoiceItem.getString("invoiceItemTypeId").equals("PINV_SPROD_ITEM"))	{
+				expenses = expenses.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+				expensesTot = expensesTot.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+			}
+			else if (invoiceItem.getString("invoiceItemTypeId").equals("PINV_MISC_CHARGE"))	{
+				MiscOut = MiscOut.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+				MiscOutTot = MiscOutTot.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+			}
+			else	{	Debug.logInfo(" not registered payment: " + invoiceItem.getString("invoiceItemTypeId"),"????????"); }
+		}
+	}
+			
+	// Sales invoices
+	invoices = delegator.findByAnd("Invoice",UtilMisc.toMap("partyId",partyId));
+	Iterator inv = invoices.iterator();
+	while (inv.hasNext())	{
+		invoice = inv.next();
+		if (invoice.getString("statusId").equals("INVOICE_CANCELLED")) continue; // ignore cancelled invoices
+		invoiceItems = invoice.getRelated("InvoiceItem");
+		Iterator invit = invoiceItems.iterator();
+		while (invit.hasNext())	{
+			invoiceItem = invit.next();
+			if (invoiceItem.getString("invoiceItemTypeId").equals("INV_SALES_TAX"))	{
+				salesTaxIn = salesTaxIn.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+				salesTaxInTot = salesTaxInTot.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+			}
+			else if (invoiceItem.getString("invoiceItemTypeId").equals("INV_SPROD_ITEM"))	{
+				revenue = revenue.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+				revenueTot = revenueTot.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+			}
+			else if (invoiceItem.getString("invoiceItemTypeId").equals("INV_MISC_CHARGE"))	{
+				MiscIn = MiscIn.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+				MiscInTot = MiscInTot.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+			}
+			 else	{	Debug.logInfo(" not registered payment: " + invoiceItem.getString("invoiceItemTypeId"),"????????"); }
+		}
+	}
+			
+	Map listItem = UtilMisc.toMap("company",partyId,"name", name, "salesTaxIn",salesTaxIn,"salesTaxOut",salesTaxOut);
+	listItem.put("expenses", expenses);
+	listItem.put("revenue", revenue);
+	listItem.put("miscIn", MiscIn);
+	listItem.put("miscOut", MiscOut);
+	BigDecimal totalValue = salesTaxIn.add(salesTaxOut).add(revenue).add(expenses).add(MiscOut).add(MiscIn);
+	listItem.put("totalValue", totalValue);
+	invoiceList.add(listItem);
+}
+
+Map listItem = UtilMisc.toMap("company","Total.","name", " ", "salesTaxIn",salesTaxInTot,"salesTaxOut",salesTaxOutTot);
+listItem.put("expenses", expensesTot);
+listItem.put("revenue", revenueTot);
+listItem.put("miscIn", MiscInTot);
+listItem.put("miscOut", MiscOutTot);
+BigDecimal totalValueTot = salesTaxInTot.add(salesTaxOutTot).add(revenueTot).add(expensesTot).add(MiscOutTot).add(MiscInTot);
+listItem.put("totalValue", totalValueTot);
+invoiceList.add(listItem);
+
+// create total check of all values
+BigDecimal generalTotal = new BigDecimal("0");
+ii = delegator.findAll("InvoiceItem");
+	Iterator it = ii.iterator();
+	while (it.hasNext())	{
+		invoiceItem = it.next();
+		GenericValue invoice = invoiceItem.getRelatedOne("Invoice");
+			if (invoice.getString("statusId").equals("INVOICE_CANCELLED")) continue; // ignore cancelled items
+		if (invoice.getString("statusId").equals("INVOICE_CANCELLED")) continue; // ignore cancelled items
+		if (!invoice.getString("partyIdFrom").equals(organizationPartyId) &&
+					!invoice.getString("partyId").equals(organizationPartyId)) continue; // only items from organization party id
+		generalTotal = generalTotal.add(invoiceItem.getBigDecimal("amount")).setScale(2,4);
+	}
+Map listItem = UtilMisc.toMap("company","GeneralTotal","totalValue", generalTotal);
+invoiceList.add(listItem);
+
+context.put("invoiceList",invoiceList);
\ No newline at end of file



More information about the Svn mailing list