[Erp5-report] r18099 - in /erp5/trunk/bt5/erp5_payroll: SkinTemplateItem/portal_skins/erp5_...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 6 22:46:11 CET 2007


Author: fabien
Date: Thu Dec  6 22:46:11 2007
New Revision: 18099

URL: http://svn.erp5.org?rev=18099&view=rev
Log:
lot of changes, incuding :
- rename base_amount_current_value_dict in base_amount_dict
- change this previous dict to stock values of all tax_category
- now, Pay Sheet Model Line could use only tax_category (without any slice)
- add a comment in PaySheetTransaction_getMovementList
- add uses of cartesian_product witch is more efficient and more evolutive
- enhance PaySheetTransaction_getYearToDateNetPay script (over_time is not take
into account in french payroll)
- add PaySheetTransaction_getYearToDateBaseSalary script
- add PaySheetTransaction_getYearToDateOvertimeAmount script
- rename PaySheetTransaction_getYearToDateOverTimeHours in
PaySheetTransaction_getYearToDateOvertimeHours.xml
- remove all reverse() : before this commit, there were some reverse() to have  the Matrixbox displayed with slice on the left column and the tax_category on
the head line. Now it's in the default order, and it's less confused.
- typo

Added:
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseSalary.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeAmount.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeHours.xml
Modified:
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_defaultCalculationScript.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateNetPay.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateTaxableNetPay.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_asCellRange.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox_price.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/my_resource_title.xml
    erp5/trunk/bt5/erp5_payroll/bt/revision

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_defaultCalculationScript.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_defaultCalculationScript.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_defaultCalculationScript.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_defaultCalculationScript.xml Thu Dec  6 22:46:11 2007
@@ -67,22 +67,31 @@
             <key> <string>_body</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
+precision = context.getPriceCurrencyValue().getQuantityPrecision()\n
 base_application = 0\n
-if base_amount_current_value_dict:\n
+tax_category_list = cell.getVariationCategoryList(base_category_list= \\\n
+    \'tax_category\')\n
+if tax_category_list != []:\n
+  tax_category = tax_category_list[0]\n
+else:\n
+  tax_category = None\n
+\n
+if base_amount_dict:\n
   # get the application amount for this cell\n
   model_line = cell.getParentValue()\n
   for base in model_line.getBaseAmountList(base=1):\n
-    if base_amount_current_value_dict.has_key(base):\n
-      base_application += base_amount_current_value_dict[base]\n
-\n
+    if base_amount_dict.has_key(base):\n
+      base_application += base_amount_dict[base][tax_category]\n
 quantity = cell.getQuantity() or 0\n
 price = cell.getPrice() or 0\n
 \n
 if not quantity and base_application-model_slice_min>0:\n
   if base_application <= model_slice_max:\n
     quantity = base_application-model_slice_min\n
+  elif model_slice_max:\n
+    quantity = model_slice_max-model_slice_min\n
   else:\n
-    quantity = model_slice_max-model_slice_min\n
+    quantity = base_application\n
 \n
 return {\'quantity\':quantity, \'price\':price}\n
 
@@ -109,7 +118,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>base_amount_current_value_dict, model_slice_min, model_slice_max, cell</string> </value>
+            <value> <string>base_amount_dict, model_slice_min, model_slice_max, cell</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -135,17 +144,22 @@
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
-                            <string>base_amount_current_value_dict</string>
+                            <string>base_amount_dict</string>
                             <string>model_slice_min</string>
                             <string>model_slice_max</string>
                             <string>cell</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>precision</string>
                             <string>base_application</string>
-                            <string>_getattr_</string>
+                            <string>tax_category_list</string>
+                            <string>_getitem_</string>
+                            <string>tax_category</string>
+                            <string>None</string>
                             <string>model_line</string>
                             <string>_getiter_</string>
                             <string>base</string>
                             <string>_inplacevar_</string>
-                            <string>_getitem_</string>
                             <string>quantity</string>
                             <string>price</string>
                           </tuple>

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml Thu Dec  6 22:46:11 2007
@@ -95,12 +95,20 @@
   for base_participation in base_participation_list:\n
     base_amount_list = pay_sheet_line.getResourceValue().getBaseAmountList()\n
     if base_participation in base_amount_list:\n
-      for slice in pay_sheet_line.getSalaryRangeList(base=1):\n
+      if pay_sheet_line.getSalaryRangeList(base=1) != []:\n
+        for slice in pay_sheet_line.getSalaryRangeList(base=1):\n
+          for category in category_list:\n
+            if category in pay_sheet_line.getVariationCategoryList():\n
+              cell = pay_sheet_line.getCell(category, slice)\n
+              total_price = cell.getQuantity() * cell.getPrice()\n
+              amount += round(total_price, precision)\n
+      else:\n
         for category in category_list:\n
           if category in pay_sheet_line.getVariationCategoryList():\n
-            cell = pay_sheet_line.getCell(category, slice)\n
+            cell = pay_sheet_line.getCell(category)\n
             total_price = cell.getQuantity() * cell.getPrice()\n
             amount += round(total_price, precision)\n
+        \n
       break # this permit to add only one time the amount even \n
             # if many base_amount are in base_participation_list\n
 \n

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml Thu Dec  6 22:46:11 2007
@@ -87,9 +87,6 @@
 model_line_editable_list = [x.getObject() for x in model_line_list \\\n
                             if x.getObject().isEditable()]\n
 \n
-\n
-\n
-\n
 line_list = []\n
 for model_line in model_line_editable_list:\n
 \n
@@ -103,7 +100,6 @@
   service = model_line.getResourceValue()\n
 \n
   for tuple in cartesian_product:\n
-    tuple.reverse() #XXX understand why it is necesary\n
     cell = model_line.getCell(*tuple)\n
     if cell is None:\n
       continue\n
@@ -128,13 +124,9 @@
 \n
     params.update(tuple_dict)\n
 \n
-    #line_list.append(model_line.asContext(**params))\n
     line_list.append(cell.asContext(**params))\n
 \n
 return line_list\n
-\n
-#return context.PaySheetTransaction_getTempObjectListFromModelLineList(\\\n
-#    model_line_list = model_line_editable_list)\n
 </string> </value>
         </item>
         <item>

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml Thu Dec  6 22:46:11 2007
@@ -65,50 +65,94 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>from Products.PythonScripts.standard import Object\n
+            <value> <string>\'\'\'\n
+  This script return a Pay Sheet Line list with some new parameters on\n
+  each Pay Sheet Line (like base, base_name, base_participation_list,\n
+  payroll_service,...)\n
+  It\'s used in the PaySheetTransaction_view to display PaySheetLines\n
+\'\'\'\n
+\n
+\n
+from Products.ERP5Type.Utils import cartesianProduct\n
 import pprint\n
-\n
-paysheet_line_list = context.contentValues(portal_type=\'Pay Sheet Line\')\n
 from Products.ERP5Type.Message import Message\n
 N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
+\n
+\n
+paysheet_line_list = context.contentValues(portal_type=\'Pay Sheet Line\')\n
 if context.getPriceCurrencyValue():\n
   precision = context.getPriceCurrencyValue().getQuantityPrecision()\n
 else:\n
   precision = 2\n
 \n
+\n
 line_list = []\n
 \n
 for paysheet_line in paysheet_line_list:\n
-  slice_list = paysheet_line.getSalaryRangeValueList()\n
-  tax_category_list = paysheet_line.getVariationCategoryList(\\\n
-      base_category_list=\'tax_category\')\n
-\n
-  for slice in slice_list:\n
-    share_dict={}\n
-    quantity=0\n
-    for tax_category in tax_category_list:\n
-      cell = paysheet_line.getCell(tax_category, slice.getRelativeUrl())\n
-      quantity = cell.getQuantity()\n
-      price = cell.getPrice()\n
-      share_dict[cell.getTaxCategory()+\'_rate\'] = price\n
-      share_dict[cell.getTaxCategory()+\'_amount\'] = round(quantity*price,\n
-          precision)\n
-\n
-    # In theory, the base is the same for all share, but changes with the slice\n
+  base_category_list = paysheet_line.getVariationBaseCategoryList()\n
+  list_of_list = []\n
+  for base_category in base_category_list:\n
+    list = paysheet_line.getVariationCategoryList(base_category_list=\\\n
+        base_category)\n
+    list_of_list.append(list)\n
+  cartesian_product = cartesianProduct(list_of_list)\n
+\n
+  previous_share = None\n
+  indice = 0\n
+\n
+  object_dict = {}\n
+  for tuple in cartesian_product:\n
+    indice += 1\n
+    share_dict = {}\n
+    cell = paysheet_line.getCell(*tuple)\n
+    if cell is None:\n
+      continue\n
+\n
+    quantity = cell.getQuantity()\n
     base = quantity\n
 \n
     base_list = [str(N_(base_application)) for base_application in \\\n
         paysheet_line.getBaseAmountTitleList()]\n
     base_name = \'+\'.join(base_list)\n
+\n
     payroll_service = paysheet_line.getResourceValue()\n
     base_participation_list = payroll_service.getBaseAmountList()\n
-    line_list.append(paysheet_line.asContext(\n
-                    slice=slice.getTitle(),\n
-                    base_name=base_name,\n
-                    base=base,\n
-                    base_participation_list=base_participation_list,\n
-                    payroll_service=payroll_service.getId(),\n
-                    **share_dict))\n
+\n
+    price = cell.getPrice()\n
+    share_dict[cell.getTaxCategory()+\'_rate\'] = price\n
+    share_dict[cell.getTaxCategory()+\'_amount\'] = round(quantity*price,\n
+        precision)\n
+\n
+    tuple_dict = {}\n
+    for item in tuple:\n
+      # the dict key is the base category and value is the category path\n
+      tuple_dict[item.split(\'/\')[0]]=context.portal_categories.restrictedTraverse(item).getTitle()\n
+      tuple_dict[item.split(\'/\')[0]+\'_relative_url\']=item\n
+\n
+    # we want to display as lines as a paysheet line as slices\n
+    # this is esay to read\n
+    slice = cell.getSalaryRange()\n
+    if slice is None:\n
+      slice = \'no_slice\'\n
+    if not object_dict.has_key(slice):\n
+      slice_title = None\n
+      if tuple_dict.has_key(\'salary_range\'):\n
+        slice_title=tuple_dict[\'salary_range\']\n
+      object_dict[slice]={\n
+                    \'slice\':slice_title,\n
+                    \'base_name\':base_name,\n
+                    \'base\':base,\n
+                    \'base_participation_list\':base_participation_list,\n
+                    \'payroll_service\':payroll_service.getId()}\n
+      object_dict[slice].update(share_dict)\n
+    else:\n
+      object_dict[slice].update(**share_dict)\n
+\n
+\n
+  for object_key in paysheet_line.getSalaryRangeList():\n
+    line_list.append(paysheet_line.asContext(**object_dict[object_key]))\n
+  if object_dict.has_key(\'no_slice\'):\n
+    line_list.append(paysheet_line.asContext(**object_dict[\'no_slice\']))\n
 \n
 if kw.has_key(\'sort_on\'):\n
   list = kw[\'sort_on\']\n
@@ -166,29 +210,34 @@
                         <value>
                           <tuple>
                             <string>kw</string>
-                            <string>Products.PythonScripts.standard</string>
-                            <string>Object</string>
+                            <string>Products.ERP5Type.Utils</string>
+                            <string>cartesianProduct</string>
                             <string>pprint</string>
+                            <string>Products.ERP5Type.Message</string>
+                            <string>Message</string>
+                            <string>N_</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>paysheet_line_list</string>
-                            <string>Products.ERP5Type.Message</string>
-                            <string>Message</string>
-                            <string>N_</string>
                             <string>precision</string>
                             <string>line_list</string>
                             <string>_getiter_</string>
                             <string>paysheet_line</string>
-                            <string>slice_list</string>
-                            <string>tax_category_list</string>
-                            <string>slice</string>
+                            <string>base_category_list</string>
+                            <string>list_of_list</string>
+                            <string>base_category</string>
+                            <string>list</string>
+                            <string>cartesian_product</string>
+                            <string>None</string>
+                            <string>previous_share</string>
+                            <string>indice</string>
+                            <string>object_dict</string>
+                            <string>tuple</string>
+                            <string>_inplacevar_</string>
                             <string>share_dict</string>
+                            <string>_apply_</string>
+                            <string>cell</string>
                             <string>quantity</string>
-                            <string>tax_category</string>
-                            <string>cell</string>
-                            <string>price</string>
-                            <string>_write_</string>
-                            <string>round</string>
                             <string>base</string>
                             <string>append</string>
                             <string>$append0</string>
@@ -198,9 +247,15 @@
                             <string>base_name</string>
                             <string>payroll_service</string>
                             <string>base_participation_list</string>
-                            <string>_apply_</string>
+                            <string>price</string>
+                            <string>_write_</string>
+                            <string>round</string>
+                            <string>tuple_dict</string>
+                            <string>item</string>
                             <string>_getitem_</string>
-                            <string>list</string>
+                            <string>slice</string>
+                            <string>slice_title</string>
+                            <string>object_key</string>
                           </tuple>
                         </value>
                     </item>

Added: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseSalary.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseSalary.xml?rev=18099&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseSalary.xml (added)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseSalary.xml Thu Dec  6 22:46:11 2007
@@ -1,0 +1,167 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>if paysheet is None:\n
+    paysheet = context\n
+\n
+portal_simulation = context.getPortalObject().portal_simulation\n
+\n
+params = {\n
+    \'node_uid\' : paysheet.getSourceSectionUid(),\n
+    \'mirror_section_uid\' : paysheet.getSourceSectionUid(),\n
+    \'section_uid\' : paysheet.getDestinationSectionUid(),\n
+    \'tax_category_uid\' :\\\n
+        context.portal_categories.tax_category.employee_share.getUid(),\n
+    \'to_date\' : paysheet.getStartDate(),\n
+    \'from_date\' : DateTime(paysheet.getStartDate().year(), 1, 1),\n
+    #\'simulation_state\'    : [\'confirmed\', \'stopped\', \'delivered\'],\n
+    \'precision\' : paysheet.getPriceCurrencyValue().getQuantityPrecision(),\n
+    \'resource_category\' : [\'base_amount/base_salary\',]\n
+    #\'src__\' : 1\n
+  }\n
+\n
+return portal_simulation.getInventoryAssetPrice(**params)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>paysheet=None</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>paysheet</string>
+                            <string>None</string>
+                            <string>context</string>
+                            <string>_getattr_</string>
+                            <string>portal_simulation</string>
+                            <string>DateTime</string>
+                            <string>params</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>PaySheetTransaction_getYearToDateBaseSalary</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateNetPay.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateNetPay.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateNetPay.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateNetPay.xml Thu Dec  6 22:46:11 2007
@@ -84,8 +84,8 @@
   }\n
 \n
 deductible_tax = portal_simulation.getInventoryAssetPrice(**params)\n
-\n
-return context.PaySheetTransaction_getYearToDateGrossSalary() - deductible_tax\n
+over_time = context.PaySheetTransaction_getYearToDateOvertimeAmount()\n
+return context.PaySheetTransaction_getYearToDateGrossSalary() - over_time - deductible_tax\n
 </string> </value>
         </item>
         <item>
@@ -137,6 +137,7 @@
                             <string>params</string>
                             <string>_apply_</string>
                             <string>deductible_tax</string>
+                            <string>over_time</string>
                           </tuple>
                         </value>
                     </item>

Added: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeAmount.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeAmount.xml?rev=18099&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeAmount.xml (added)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeAmount.xml Thu Dec  6 22:46:11 2007
@@ -1,0 +1,167 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>if paysheet is None:\n
+    paysheet = context\n
+\n
+portal_simulation = context.getPortalObject().portal_simulation\n
+\n
+params = {\n
+    \'node_uid\' : paysheet.getSourceSectionUid(),\n
+    \'mirror_section_uid\' : paysheet.getSourceSectionUid(),\n
+    \'section_uid\' : paysheet.getDestinationSectionUid(),\n
+    \'tax_category_uid\' :\\\n
+        context.portal_categories.tax_category.employee_share.getUid(),\n
+    \'to_date\' : paysheet.getStartDate(),\n
+    \'from_date\' : DateTime(paysheet.getStartDate().year(), 1, 1),\n
+    #\'simulation_state\'    : [\'confirmed\', \'stopped\', \'delivered\'],\n
+    \'precision\' : paysheet.getPriceCurrencyValue().getQuantityPrecision(),\n
+    \'resource_category\' : [\'base_amount/over_time\',]\n
+    #\'src__\' : 1\n
+  }\n
+\n
+return portal_simulation.getInventoryAssetPrice(**params)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>paysheet=None</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>paysheet</string>
+                            <string>None</string>
+                            <string>context</string>
+                            <string>_getattr_</string>
+                            <string>portal_simulation</string>
+                            <string>DateTime</string>
+                            <string>params</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>PaySheetTransaction_getYearToDateOvertimeAmount</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeHours.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeHours.xml?rev=18099&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeHours.xml (added)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeHours.xml Thu Dec  6 22:46:11 2007
@@ -1,0 +1,172 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>portal = context.getPortalObject()\n
+accounting_module = portal.accounting_module\n
+\n
+from_date=DateTime(context.getStartDate().year(), 1, 1)\n
+to_date=context.getStartDate()\n
+\n
+search_params = \\\n
+  { \n
+   \'portal_type\'         : \'Pay Sheet Transaction\',\n
+   \'delivery.start_date\' : {\'range\': "minmax", \'query\': (from_date, to_date)},\n
+   \'delivery.source_section_uid\' : context.getSourceSectionUid(),\n
+#   \'simulation_state\'    : [\'confirmed\', \'stopped\', \'delivered\'],\n
+  }\n
+\n
+paysheet_list = accounting_module.searchFolder( **search_params)\n
+\n
+yearly_work_time = 0\n
+for paysheet in paysheet_list:\n
+  yearly_work_time += paysheet.getOvertimeAnnotationLineQuantity(0)\n
+\n
+return yearly_work_time\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>portal</string>
+                            <string>accounting_module</string>
+                            <string>DateTime</string>
+                            <string>from_date</string>
+                            <string>to_date</string>
+                            <string>search_params</string>
+                            <string>_apply_</string>
+                            <string>paysheet_list</string>
+                            <string>yearly_work_time</string>
+                            <string>_getiter_</string>
+                            <string>paysheet</string>
+                            <string>_inplacevar_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>PaySheetTransaction_getYearToDateOvertimeHours</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateTaxableNetPay.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateTaxableNetPay.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateTaxableNetPay.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateTaxableNetPay.xml Thu Dec  6 22:46:11 2007
@@ -85,8 +85,10 @@
 \n
 \n
 deductible_tax = portal_simulation.getInventoryAssetPrice(**params)\n
+over_time = context.PaySheetTransaction_getYearToDateOvertimeAmount()\n
+gross_salary = context.PaySheetTransaction_getYearToDateGrossSalary()\n
 \n
-return context.PaySheetTransaction_getYearToDateGrossSalary() - deductible_tax\n
+return gross_salary - over_time - deductible_tax\n
 </string> </value>
         </item>
         <item>
@@ -138,6 +140,8 @@
                             <string>params</string>
                             <string>_apply_</string>
                             <string>deductible_tax</string>
+                            <string>over_time</string>
+                            <string>gross_salary</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_asCellRange.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_asCellRange.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_asCellRange.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_asCellRange.xml Thu Dec  6 22:46:11 2007
@@ -91,7 +91,6 @@
 if matrixbox :\n
   if resource is not None:\n
     base_category_list = resource.getVariationBaseCategoryList()\n
-    base_category_list.reverse()\n
     for base_category in base_category_list:\n
       category_cell_range = []\n
       category_item_list = context.getVariationCategoryItemList(base_category_list = (base_category,))\n
@@ -113,7 +112,6 @@
 else:\n
   list_of_category_list = []\n
   variation_base_category_list = context.getVariationBaseCategoryList()\n
-  variation_base_category_list.reverse()\n
   for base_category in variation_base_category_list:\n
     list_of_category_list.append(\\\n
         context.getVariationCategoryList(base_category_list=base_category))\n

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox.xml Thu Dec  6 22:46:11 2007
@@ -259,6 +259,14 @@
                           <string>price</string>
                           <string>Share</string>
                         </tuple>
+                        <tuple>
+                          <string>variation_category_list</string>
+                          <string>variation_category_list</string>
+                        </tuple>
+                        <tuple>
+                          <string>predicate_category_list</string>
+                          <string>predicate_category_list</string>
+                        </tuple>
                       </list>
                     </value>
                 </item>
@@ -281,14 +289,6 @@
                         <tuple>
                           <string>mapped_value_property_list</string>
                           <string>mapped_value_property_list</string>
-                        </tuple>
-                        <tuple>
-                          <string>variation_category_list</string>
-                          <string>variation_category_list</string>
-                        </tuple>
-                        <tuple>
-                          <string>predicate_category_list</string>
-                          <string>predicate_category_list</string>
                         </tuple>
                       </list>
                     </value>

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox_price.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox_price.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox_price.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/matrixbox_price.xml Thu Dec  6 22:46:11 2007
@@ -285,7 +285,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: cell.getProperty(\'price\')</string> </value>
+            <value> <string>python:cell.getProperty(\'price\')</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/my_resource_title.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/my_resource_title.xml?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/my_resource_title.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_paysheet_model/PaySheetModelLine_view/my_resource_title.xml Thu Dec  6 22:46:11 2007
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.ERP5Form.RelationField</string>
-          <string>RelationStringField</string>
-        </tuple>
-        <none/>
+        <global name="RelationStringField" module="Products.ERP5Form.RelationField"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -143,6 +140,14 @@
             <value>
               <dictionary>
                 <item>
+                    <key> <string>allow_creation</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>allow_jump</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
                     <key> <string>alternate_name</string> </key>
                     <value> <string></string> </value>
                 </item>
@@ -155,6 +160,14 @@
                     <value> <string></string> </value>
                 </item>
                 <item>
+                    <key> <string>columns</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>container_getter_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
                     <key> <string>css_class</string> </key>
                     <value> <string></string> </value>
                 </item>
@@ -195,18 +208,46 @@
                     <value> <string></string> </value>
                 </item>
                 <item>
+                    <key> <string>extra_item</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>first_item</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
                     <key> <string>hidden</string> </key>
                     <value> <string></string> </value>
                 </item>
                 <item>
+                    <key> <string>items</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
                     <key> <string>jump_method</string> </key>
                     <value> <string></string> </value>
                 </item>
                 <item>
+                    <key> <string>list_method</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
                     <key> <string>max_length</string> </key>
                     <value> <string></string> </value>
                 </item>
                 <item>
+                    <key> <string>max_linelength</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_lines</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>parameter_list</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
                     <key> <string>portal_type</string> </key>
                     <value> <string></string> </value>
                 </item>
@@ -216,6 +257,14 @@
                 </item>
                 <item>
                     <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>size</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>sort</string> </key>
                     <value> <string></string> </value>
                 </item>
                 <item>

Modified: erp5/trunk/bt5/erp5_payroll/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/bt/revision?rev=18099&r1=18098&r2=18099&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/bt/revision (original)
+++ erp5/trunk/bt5/erp5_payroll/bt/revision Thu Dec  6 22:46:11 2007
@@ -1,1 +1,1 @@
-179
+184




More information about the Erp5-report mailing list