diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance.xml new file mode 100644 index 0000000000000000000000000000000000000000..c1ab1632039817132599cc36f3532a60ee0b8d83 --- /dev/null +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance.xml @@ -0,0 +1,234 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.PythonScripts.PythonScript</string> + <string>PythonScript</string> + </tuple> + <none/> + </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 encoding="cdata"><![CDATA[ + +# check that the amount of `resource` in account `payment` is greater than or equal to `quantity`\n +\n +# returns a dictionnary like : {\'error_code\', \'balance\'}\n +\n +#workflow_id = \'bank_account_workflow\'\n +workflow_correct_state_list = (\'valid\', \'being_modified\', \'validating_modification\')\n +manual_validation_account_category_list = (\'test\',)\n +\n +# First check that the payment account is in an acceptable state\n +#payment_state = context.portal_workflow.getInfoFor(ob=payment, name=\'simulation_state\', wf_id=workflow_id)\n +payment_value = context.restrictedTraverse(payment)\n +payment_state = payment_value.getValidationState()\n +\n +if payment_state not in workflow_correct_state_list :\n + return {\'error_code\':2} # closed account\n +\n +resource = payment_value.getPriceCurrencyValue()\n +\n +if resource is None :\n + raise AttributeError, \'No currency defined on %s\' % payment\n +\n +# Next, check the balance of the account\n +account_balance = resource.getAvailableInventory(payment=payment, src__=src__)\n +context.log("account balance",account_balance)\n +context.log("resource payement", str((resource,payment)))\n +if src__ :\n + return account_balance \n +\n +if account_balance - quantity < 0 :\n +# if payment.getBankAccountType() in manual_validation_account_category_list :\n +# return {\'error_code\':3, \'balance\':account_balance} # manual_validation\n +\n + return {\'error_code\':1, \'balance\':account_balance} # insufficient balance\n +\n +return {\'error_code\':0, \'balance\':account_balance} # ok\n + + +]]></string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_dav_writelocks</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance</string> </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>payment, quantity, src__=0</string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </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>3</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>payment</string> + <string>quantity</string> + <string>src__</string> + <string>workflow_correct_state_list</string> + <string>manual_validation_account_category_list</string> + <string>_getattr_</string> + <string>context</string> + <string>payment_value</string> + <string>payment_state</string> + <string>resource</string> + <string>None</string> + <string>AttributeError</string> + <string>account_balance</string> + <string>str</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <int>0</int> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>BankAccount_checkAvailableBalance</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Persistence</string> + <string>PersistentMapping</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_container</string> </key> + <value> + <dictionary/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml index 4ea3af20a06fdfe0c189665c0dffd251c198baab..1748fe479fa3a62c181a6a14eefda5196173d2f1 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml @@ -93,7 +93,8 @@ if resource is None :\n \n # Next, check the balance of the account\n account_balance = resource.getFutureInventory(payment=payment, src__=src__)\n -#context.log("account balance",account_balance)\n +context.log("account balance",account_balance)\n +context.log("resource payement", str((resource,payment)))\n if src__ :\n return account_balance \n \n @@ -179,6 +180,7 @@ return {\'error_code\':0, \'balance\':account_balance} # ok\n <string>None</string> <string>AttributeError</string> <string>account_balance</string> + <string>str</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkCounterDateOpen.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkCounterDateOpen.xml index 0ba8b422307de469107ff84659aa0fe173e8256e..0b34bc39ac66afb0ac76a35e790db46e99fc2b5d 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkCounterDateOpen.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkCounterDateOpen.xml @@ -74,7 +74,9 @@ if date is None:\n # get current date\n from DateTime import DateTime\n date = DateTime()\n - date = date.Date()\n +\n +# Make sure we have a date with no hours\n +date = date.Date()\n \n if site is None:\n # get site from user assignment\n diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml index c39bcf3b1bd954856cb1f10b251c025fe1ec8a9a..ffef6af887c5806565362c6a0a43c9fe11d91911 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml @@ -95,7 +95,7 @@ base_category_list = (\'emission_letter\', \'cash_status\', \'variation\')\n per_resource_dict = {}\n \n # remove previous line\n -old_line = [x.getObject() for x in context.searchFolder(portal_type=[line_portal_type,])]\n +old_line = context.objectValues(portal_type=[line_portal_type,])\n #context.log("will erease old line", old_line)\n if len(old_line)>0:\n for object_list in old_line:\n @@ -266,7 +266,7 @@ if variation_not_defined:\n else:\n request = context.REQUEST\n redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n - , \'portal_status_message=Lines%%20Created\'\n + , \'portal_status_message=Lines%20Created\'\n )\n request[ \'RESPONSE\' ].redirect( redirect_url )\n @@ -349,14 +349,11 @@ else:\n <string>column_base_list</string> <string>base_category_list</string> <string>per_resource_dict</string> - <string>append</string> - <string>$append0</string> - <string>_getiter_</string> <string>_getattr_</string> <string>context</string> - <string>x</string> <string>old_line</string> <string>len</string> + <string>_getiter_</string> <string>object_list</string> <string>line</string> <string>xrange</string> @@ -389,6 +386,9 @@ else:\n <string>mapped_value_list</string> <string>variation_item</string> <string>cell</string> + <string>append</string> + <string>$append0</string> + <string>x</string> <string>request</string> <string>redirect_url</string> </tuple> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckModule_viewCheckList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckModule_viewCheckList.xml index 6a8d80a4e659ccdd34b85da3f9274851a711c533..53599d16fde641ffdbfa18620dd0a77e1eefc7a5 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckModule_viewCheckList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckModule_viewCheckList.xml @@ -67,11 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> - <string>hidden</string> </list> </value> </item> @@ -80,37 +76,13 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>left</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckbookModelModule_viewCheckbookModelList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckbookModelModule_viewCheckbookModelList.xml index 9ccc26dee97761512e8441821060d7a8cf3ddc8f..2a9e0fb53d4da3a4368b473f90bece0f2249d386 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckbookModelModule_viewCheckbookModelList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckbookModelModule_viewCheckbookModelList.xml @@ -67,9 +67,6 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> </list> </value> @@ -79,31 +76,13 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>left</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckbookModule_viewCheckbookList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckbookModule_viewCheckbookList.xml index bacfa109ce7df541886fe2e11cf9537d399e0594..1b01d2de95d567e76e421f2f188cbdd5a26e6516 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckbookModule_viewCheckbookList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CheckbookModule_viewCheckbookList.xml @@ -67,11 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> - <string>hidden</string> </list> </value> </item> @@ -80,37 +76,13 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>left</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Checkbook_viewCreateCheckListDialog.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Checkbook_viewCreateCheckListDialog.xml index d88a4cdad7513a8d938aebdddeebc8eef3796660..ab4981f75c9cc88f2dcdb7ee1736f69b04caa2a4 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Checkbook_viewCreateCheckListDialog.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Checkbook_viewCreateCheckListDialog.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>Default</string> + <string>left</string> </list> </value> </item> @@ -76,7 +76,7 @@ <value> <dictionary> <item> - <key> <string>Default</string> </key> + <key> <string>left</string> </key> <value> <list> <string>my_start_number</string> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDateModule_viewCounterDateList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDateModule_viewCounterDateList.xml index ad43566af7ddfbdf79b7743529c3734c64fcd921..6d3e0ca0afb09afe7eb0990d5a334e04d3b69b0f 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDateModule_viewCounterDateList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDateModule_viewCounterDateList.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>Default</string> + <string>bottom</string> <string>hidden</string> </list> </value> @@ -77,7 +77,7 @@ <value> <dictionary> <item> - <key> <string>Default</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_viewOpenDialog.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_viewOpenDialog.xml index 7670113d6fcd1e1b0761cc5d48121df122d301e5..7e780411940fcb9b3f65884690be87f38c05a420 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_viewOpenDialog.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterDate_viewOpenDialog.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>Default</string> + <string>left</string> <string>right</string> <string>center</string> <string>bottom</string> @@ -79,12 +79,6 @@ <key> <string>groups</string> </key> <value> <dictionary> - <item> - <key> <string>Default</string> </key> - <value> - <list/> - </value> - </item> <item> <key> <string>bottom</string> </key> <value> @@ -108,6 +102,12 @@ </list> </value> </item> + <item> + <key> <string>left</string> </key> + <value> + <list/> + </value> + </item> <item> <key> <string>right</string> </key> <value> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList.xml index 3f77a793c283b207a16abf5f0728130bccfe6331..c86490d6983e5fc0b410998911e1aec4ef2289dc 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList.xml @@ -130,8 +130,8 @@ if column_names == 1:\n column_list.append((\'general_total_price\', \'General TotalPrice\'))\n return column_list\n \n -context.log(\'node_category\',vault)\n -context.log(\'inventory_kw\',inventory_kw)\n +#context.log(\'node_category\',vault)\n +#context.log(\'inventory_kw\',inventory_kw)\n vault_inventory_list = context.portal_simulation.getCurrentInventoryList( node_category=vault\n , ignore_variation=0\n ,**inventory_kw\n @@ -155,6 +155,9 @@ for vault_inventory in vault_inventory_list:\n total_price = vault_inventory.total_price\n if total_price is None:\n total_price = 0\n + if only_positive:\n + total_price = abs(total_price)\n + total_quantity = abs(total_quantity)\n # context.log(\'type\',type(total_price))\n # context.log(\'sql total_price\',total_price)\n vault_inventory_dict[vault_url][resource] = {\'quantity\':total_quantity, \'total_price\':total_price,\n @@ -257,7 +260,7 @@ return repr([x for x in total_inventory_list])\n </item> <item> <key> <string>_params</string> </key> - <value> <string>vault=None,at_date=None,from_date=None,vault_report_type=None,column_names=0,resource_portal_type=(\'Banknote\',\'Coin\'),**kw</string> </value> + <value> <string>vault=None,at_date=None,from_date=None,vault_report_type=None,column_names=0,resource_portal_type=(\'Banknote\',\'Coin\'), only_positive=0, **kw</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -277,7 +280,7 @@ return repr([x for x in total_inventory_list])\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>6</int> </value> + <value> <int>7</int> </value> </item> <item> <key> <string>co_varnames</string> </key> @@ -289,6 +292,7 @@ return repr([x for x in total_inventory_list])\n <string>vault_report_type</string> <string>column_names</string> <string>resource_portal_type</string> + <string>only_positive</string> <string>kw</string> <string>Products.ERP5Type.Document</string> <string>newTempBase</string> @@ -306,13 +310,14 @@ return repr([x for x in total_inventory_list])\n <string>_getitem_</string> <string>column_list</string> <string>_getiter_</string> - <string>context</string> <string>_apply_</string> + <string>context</string> <string>vault_inventory_list</string> <string>vault_inventory</string> <string>resource</string> <string>total_quantity</string> <string>total_price</string> + <string>abs</string> <string>total_inventory_list</string> <string>i</string> <string>variation_text</string> @@ -352,6 +357,7 @@ return repr([x for x in total_inventory_list])\n <string>Banknote</string> <string>Coin</string> </tuple> + <int>0</int> </tuple> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewCounterList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewCounterList.xml index df880a0b9c093804b4ee20b3e7425b4977fa1114..24bf2c6a1c002731639dd22205914d2c87f91680 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewCounterList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewCounterList.xml @@ -67,9 +67,6 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> <string>hidden</string> </list> @@ -80,39 +77,21 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>hidden</string> </key> + <key> <string>bottom</string> </key> <value> <list> - <string>listbox_site</string> + <string>listbox</string> </list> </value> </item> <item> - <key> <string>left</string> </key> + <key> <string>hidden</string> </key> <value> <list> - <string>listbox</string> + <string>listbox_site</string> </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewReportDialog.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewReportDialog.xml index 3e0380fe7c384e7419e83d47c6d1eae797ff4049..560dfbeb83d71acaeba579df517df3be1c4ab083 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewReportDialog.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewReportDialog.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>Default</string> + <string>left</string> </list> </value> </item> @@ -76,7 +76,7 @@ <value> <dictionary> <item> - <key> <string>Default</string> </key> + <key> <string>left</string> </key> <value> <list> <string>my_vault_report_type</string> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewVaultReport.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewVaultReport.xml index 1950ae10d2e767e370dabf39a139517d0081456d..4f04994401fe84cce560d42789c3fe1c893eee9e 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewVaultReport.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_viewVaultReport.xml @@ -67,9 +67,6 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> <string>hidden</string> </list> @@ -80,39 +77,22 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> + <key> <string>bottom</string> </key> <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> + <list> + <string>listbox</string> + </list> </value> </item> <item> <key> <string>hidden</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>left</string> </key> <value> <list> - <string>listbox</string> <string>listbox_total_price</string> <string>listbox_total_quantity</string> </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyCashModule_viewCurrencyCashList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyCashModule_viewCurrencyCashList.xml index 9245ee3771141b667291f92464acdca218acb351..77d41cd7a54197849b8879ecb89ef56ee930a7b4 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyCashModule_viewCurrencyCashList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyCashModule_viewCurrencyCashList.xml @@ -67,7 +67,7 @@ <key> <string>group_list</string> </key> <value> <list> - <string>Default</string> + <string>bottom</string> </list> </value> </item> @@ -76,7 +76,7 @@ <value> <dictionary> <item> - <key> <string>Default</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyPurchase_getQuantity.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyPurchase_getQuantity.xml index 894528f56186fa91394f1c7f6e364764fa90ec50..5a351fce533d53f268e7bdf760137aef3e620cf5 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyPurchase_getQuantity.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencyPurchase_getQuantity.xml @@ -75,8 +75,10 @@ commission_price = context.getDiscount()\n if commission_ratio is not None and commission_ratio !=0 and commission_price is not None and commission_price !=0:\n return None\n if commission_ratio == 0 or commission_price == 0:\n + price = round(price,0)\n return price\n if commission_ratio is None and commission_price is None:\n + price = round(price,0)\n return price\n \n if commission_ratio is not None:\n @@ -86,7 +88,7 @@ if commission_price is not None:\n commission_value = commission_price\n \n quantity = price - commission_value\n -quantity = round(quantity-0.5,0)\n +quantity = round(quantity,0)\n if quantity!=context.getQuantity():\n context.setQuantity(quantity)\n return quantity\n @@ -148,9 +150,9 @@ return quantity\n <string>commission_ratio</string> <string>commission_price</string> <string>None</string> + <string>round</string> <string>commission_value</string> <string>quantity</string> - <string>round</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencySale_getQuantity.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencySale_getQuantity.xml index bcb130c511d67c3a03921e14c9ba9bba01cca0c4..71dc5db7cbb58e059bce0c04780f1e5f3dbf1b77 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencySale_getQuantity.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CurrencySale_getQuantity.xml @@ -75,8 +75,10 @@ commission_price = context.getDiscount()\n if commission_ratio is not None and commission_ratio !=0 and commission_price is not None and commission_price !=0:\n return None\n if commission_ratio == 0 or commission_price == 0:\n + price = round(price,0)\n return price\n if commission_ratio is None and commission_price is None:\n + price = round(price,0)\n return price\n \n if commission_ratio is not None:\n @@ -86,7 +88,7 @@ if commission_price is not None:\n commission_value = commission_price\n \n quantity = price + commission_value\n -quantity = round(quantity+0.5,0)\n +quantity = round(quantity,0)\n if quantity!=context.getQuantity():\n context.setQuantity(quantity)\n return quantity\n @@ -148,9 +150,9 @@ return quantity\n <string>commission_ratio</string> <string>commission_price</string> <string>None</string> + <string>round</string> <string>commission_value</string> <string>quantity</string> - <string>round</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/ERP5Banking_getExchangeValue.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/ERP5Banking_getExchangeValue.xml index 8156784c1086b2d25a961d3d2bc036df08305b76..a08a090fa97cde54e711652128d4c22036ca0b92 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/ERP5Banking_getExchangeValue.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/ERP5Banking_getExchangeValue.xml @@ -82,7 +82,7 @@ if None in (rate, price):\n \n price = float(price)\n \n -return rate * price\n +return round(rate * price)\n ]]></string> </value> @@ -140,6 +140,7 @@ return rate * price\n <string>_getitem_</string> <string>price</string> <string>float</string> + <string>round</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyList.xml index dc697a1387cd9c27b665a8be4b6d02b63224d0d8..c1293a570de0125439d8be40c722b4b5500c7f80 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyList.xml @@ -67,9 +67,6 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> </list> </value> @@ -79,31 +76,13 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>left</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyListIn.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyListIn.xml index b443a35f8f6c97bd127a44213bc34543bf674b5a..686fd371a9970d39946bdfadadff77b0b87c466c 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyListIn.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyListIn.xml @@ -67,9 +67,6 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> </list> </value> @@ -79,31 +76,13 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>left</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyListOut.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyListOut.xml index 773ff6ad9968e37118e4fade2dc2dd89aa42e875..c80ab4fa020054e7beb324b7f4c8e73c9d364c35 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyListOut.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Folder_viewCashCurrencyListOut.xml @@ -67,9 +67,6 @@ <key> <string>group_list</string> </key> <value> <list> - <string>left</string> - <string>right</string> - <string>center</string> <string>bottom</string> </list> </value> @@ -79,31 +76,13 @@ <value> <dictionary> <item> - <key> <string>bottom</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>center</string> </key> - <value> - <list/> - </value> - </item> - <item> - <key> <string>left</string> </key> + <key> <string>bottom</string> </key> <value> <list> <string>listbox</string> </list> </value> </item> - <item> - <key> <string>right</string> </key> - <value> - <list/> - </value> - </item> </dictionary> </value> </item>