Commit 70e29ebe authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* Fix a bug in Base_validateEan13Code that does not work in the case where the check digit is 0.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36307 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6e837052
......@@ -66,7 +66,7 @@ coeff = 1\n
for c in ean13_code[:12]:\n
key += int(c) * coeff\n
coeff = 4 - coeff # coeff value alternates between 1 and 3\n
key = 10 - (key % 10)\n
key = (10 - key) % 10\n
\n
if key != int(ean13_code[12]):\n
return False\n
......
2010-06-14 kazuhiko
* Fix a bug in Base_validateEan13Code that does not work in the case where the check digit is 0.
2010-05-27 yo
* Resource_getPriceCalculationOperandDict must return base_unit_price even if price is not found. So the meaning of the default parameter has changed slightly - now it represents the default value of price instead of the default value of the returned result. This way is more backward compatible.
......
501
\ No newline at end of file
502
\ 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