Commit 09524ee6 authored by Aurel's avatar Aurel

2006-10-19 aurel

* fix portal type list for getTotalPrice in wf script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10817 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fb961e71
...@@ -94,7 +94,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t ...@@ -94,7 +94,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t
\n \n
# Get price and total_price.\n # Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Cash Movement Line\',\'Cash Delivery Cell\'],fast=0)\n total_price = transaction.getTotalPrice(portal_type=[\'Cash Delivery Line\',\'Cash Delivery Cell\'],fast=0)\n
\n \n
if resource == 2:\n if resource == 2:\n
msg = Message(domain="ui", message="No Resource.")\n msg = Message(domain="ui", message="No Resource.")\n
......
...@@ -85,19 +85,10 @@ if lettering is None:\n ...@@ -85,19 +85,10 @@ if lettering is None:\n
msg = Message(domain=\'ui\', message=\'No lettering defined.\')\n msg = Message(domain=\'ui\', message=\'No lettering defined.\')\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n \n
# Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Internal Money Deposit\',\'Cash Delivery Cell\'],fast=0)\n
\n
if amount != total_price:\n
msg = Message(domain="ui", message="Amount differ from total price.")\n
raise ValidationFailed, (msg,)\n
\n
if destination is None:\n if destination is None:\n
msg = Message(domain=\'ui\', message=\'No counter defined.\')\n msg = Message(domain=\'ui\', message=\'No counter defined.\')\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n \n
\n
# check we are in an opened accounting day\n # check we are in an opened accounting day\n
if not transaction.Baobab_checkCounterDateOpen(site=destination, date=transaction.getStartDate()):\n if not transaction.Baobab_checkCounterDateOpen(site=destination, date=transaction.getStartDate()):\n
msg = Message(domain = "ui", message="Counter Date is not opened")\n msg = Message(domain = "ui", message="Counter Date is not opened")\n
...@@ -112,15 +103,13 @@ if len(counter_list) == 0:\n ...@@ -112,15 +103,13 @@ if len(counter_list) == 0:\n
msg = Message(domain = "ui", message="Counter is not opened")\n msg = Message(domain = "ui", message="Counter is not opened")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n \n
\n
source = transaction.getSource()\n source = transaction.getSource()\n
resource = transaction.CashDelivery_checkCounterInventory(source = source, portal_type=\'Cash Delivery Line\')\n resource = transaction.CashDelivery_checkCounterInventory(source = source, portal_type=\'Cash Delivery Line\')\n
#transaction.log("call to CashDelivery_getCounterInventory return", resource)\n
\n \n
# Get price and total_price.\n # Get price and total_price.\n
price = transaction.getSourceTotalAssetPrice()\n price = transaction.getSourceTotalAssetPrice()\n
cash_detail = transaction.getTotalPrice(portal_type = \'Cash Delivery Cell\')\n cash_detail = transaction.getTotalPrice(portal_type = [\'Cash Delivery Line\', \'Cash Delivery Cell\'], fast=0)\n
#transaction.log("price vs cash detail", str((price, cash_detail)))\n \n
if resource == 3:\n if resource == 3:\n
msg = Message(domain="ui", message="No banknote or coin defined.")\n msg = Message(domain="ui", message="No banknote or coin defined.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
...@@ -199,8 +188,6 @@ elif price != cash_detail:\n ...@@ -199,8 +188,6 @@ elif price != cash_detail:\n
<string>destination</string> <string>destination</string>
<string>lettering</string> <string>lettering</string>
<string>msg</string> <string>msg</string>
<string>amount</string>
<string>total_price</string>
<string>site</string> <string>site</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
......
...@@ -82,16 +82,9 @@ if (\'encaisse_des_externes\' not in vault and \'encaisse_des_billets_retires_de ...@@ -82,16 +82,9 @@ if (\'encaisse_des_externes\' not in vault and \'encaisse_des_billets_retires_de
msg = Message(domain="ui", message="Invalid source.")\n msg = Message(domain="ui", message="Invalid source.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n \n
"""\n
if \'encaisse_des_billets_neufs_non_emis\' in vault :\n
msg = Message(domain="ui", message="Invalid source.")\n
\n
raise ValidationFailed, (msg,)\n
"""\n
\n
# Get price and total_price.\n # Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Monetary Destruction Line\',\'Cash Delivery Cell\'],fast=0)\n total_price = transaction.getTotalPrice(portal_type=[\'Cash Delivery Line\',\'Cash Delivery Cell\'],fast=0)\n
\n \n
if resource == 2:\n if resource == 2:\n
msg = Message(domain="ui", message="No Resource.")\n msg = Message(domain="ui", message="No Resource.")\n
......
...@@ -80,7 +80,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t ...@@ -80,7 +80,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t
\n \n
# Get price and total_price.\n # Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Monetary Survey Line\',\'Cash Delivery Cell\'],fast=0)\n total_price = transaction.getTotalPrice(portal_type=[\'Cash Delivery Line\',\'Cash Delivery Cell\'],fast=0)\n
\n \n
if resource == 2:\n if resource == 2:\n
msg = Message(domain="ui", message="No Resource.")\n msg = Message(domain="ui", message="No Resource.")\n
......
...@@ -92,7 +92,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t ...@@ -92,7 +92,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t
\n \n
# Get price and total_price.\n # Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Money Deposit Rendering Line\',\'Cash Delivery Cell\'],fast=0)\n total_price = transaction.getTotalPrice(portal_type=[\'Cash Delivery Line\',\'Cash Delivery Cell\'],fast=0)\n
\n \n
if resource == 2:\n if resource == 2:\n
msg = Message(domain="ui", message="No Resource.")\n msg = Message(domain="ui", message="No Resource.")\n
......
...@@ -91,7 +91,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t ...@@ -91,7 +91,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t
\n \n
# Get price and total_price.\n # Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Money Deposit Transfer Line\',\'Cash Delivery Cell\'],fast=0)\n total_price = transaction.getTotalPrice(portal_type=[\'Cash Delivery Line\',\'Cash Delivery Cell\'],fast=0)\n
\n \n
if resource == 2:\n if resource == 2:\n
msg = Message(domain="ui", message="No Resource.")\n msg = Message(domain="ui", message="No Resource.")\n
......
...@@ -93,7 +93,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t ...@@ -93,7 +93,7 @@ resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_t
\n \n
# Get price and total_price.\n # Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n amount = transaction.getSourceTotalAssetPrice()\n
total_price = transaction.getTotalPrice(portal_type=[\'Usual Cash Transer Line\',\'Cash Delivery Cell\'],fast=0)\n total_price = transaction.getTotalPrice(portal_type=[\'Cash Delivery Line\',\'Cash Delivery Cell\'],fast=0)\n
\n \n
if resource == 2:\n if resource == 2:\n
msg = Message(domain="ui", message="No Resource.")\n msg = Message(domain="ui", message="No Resource.")\n
......
2006-10-19 aurel
* fix portal type list for getTotalPrice in wf script
2006-10-13 aurel 2006-10-13 aurel
* added mutilated banknote * added mutilated banknote
......
19 54
\ No newline at end of file \ No newline at end of file
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