Commit 066e492a authored by Fabien Morin's avatar Fabien Morin

add the base_amount_list property in the PaySheetLine Objects


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17702 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 02921988
...@@ -100,7 +100,8 @@ class PaySheetTransaction(Invoice): ...@@ -100,7 +100,8 @@ class PaySheetTransaction(Invoice):
security.declareProtected(Permissions.AddPortalContent, security.declareProtected(Permissions.AddPortalContent,
'createPaySheetLine') 'createPaySheetLine')
def createPaySheetLine(self, cell_list, title='', res='', desc='', **kw): def createPaySheetLine(self, cell_list, title='', res='', desc='',
base_amount_list=None, **kw):
''' '''
This function register all paysheet informations in paysheet lines and This function register all paysheet informations in paysheet lines and
cells. Select good cells only cells. Select good cells only
...@@ -135,6 +136,7 @@ class PaySheetTransaction(Invoice): ...@@ -135,6 +136,7 @@ class PaySheetTransaction(Invoice):
destination = self.getDestinationSection(), destination = self.getDestinationSection(),
variation_base_category_list = ('tax_category', 'salary_range'), variation_base_category_list = ('tax_category', 'salary_range'),
variation_category_list = var_cat_list, variation_category_list = var_cat_list,
base_amount_list = base_amount_list,
**kw) **kw)
base_id = 'movement' base_id = 'movement'
...@@ -192,12 +194,12 @@ class PaySheetTransaction(Invoice): ...@@ -192,12 +194,12 @@ class PaySheetTransaction(Invoice):
# perhaps here it will be necesary to raise an error ? # perhaps here it will be necesary to raise an error ?
if not paysheet_items.has_key(service_id): if not paysheet_items.has_key(service_id):
paysheet_items[service_id] = { paysheet_items[service_id] = {
'title' : model_line.getTitleOrId(), 'title' : model_line.getTitleOrId(),
'id' : model_line.getId(), 'desc' : [],
'desc' : [], 'base_amount_list' : model_line.getBaseAmountList(),
'res' : service.getRelativeUrl(), 'res' : service.getRelativeUrl(),
'cell_list': [] 'cell_list' : []
} }
# create cells if a value has been entered by accountable # create cells if a value has been entered by accountable
if quantity or price: if quantity or price:
...@@ -229,10 +231,10 @@ class PaySheetTransaction(Invoice): ...@@ -229,10 +231,10 @@ class PaySheetTransaction(Invoice):
desc = None desc = None
paysheet.createPaySheetLine( paysheet.createPaySheetLine(
title = item['title'], title = item['title'],
id = item['id'],
res = item['res'], res = item['res'],
desc = desc, desc = desc,
cell_list = item['cell_list'],) cell_list = item['cell_list'],
base_amount_list=item['base_amount_list'],)
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
...@@ -333,6 +335,7 @@ class PaySheetTransaction(Invoice): ...@@ -333,6 +335,7 @@ class PaySheetTransaction(Invoice):
service = model_line.getResourceValue() service = model_line.getResourceValue()
title = model_line.getTitleOrId() title = model_line.getTitleOrId()
id = model_line.getId() id = model_line.getId()
base_amount_list = model_line.getBaseAmountList()
res = service.getRelativeUrl() res = service.getRelativeUrl()
if model_line.getDescription(): if model_line.getDescription():
desc = ''.join(model_line.getDescription()) desc = ''.join(model_line.getDescription())
...@@ -437,12 +440,12 @@ class PaySheetTransaction(Invoice): ...@@ -437,12 +440,12 @@ class PaySheetTransaction(Invoice):
if cell_list: if cell_list:
# create the PaySheetLine # create the PaySheetLine
pay_sheet_line = self.createPaySheetLine( pay_sheet_line = self.createPaySheetLine(
title = title, title = title,
id = id, res = res,
res = res, desc = desc,
desc = desc, base_amount_list = base_amount_list,
cell_list = cell_list, cell_list = cell_list,
) )
pay_sheet_line_list.append(pay_sheet_line) pay_sheet_line_list.append(pay_sheet_line)
# create a line of the total tax payed by the employee # create a line of the total tax payed by the employee
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment