usa Amount en Quantity
FossilOrigin-Name: 0f51683a044925969f6f113710ca9456dfa541a80ec3d7a3b9e5235718cbf0ea
This commit is contained in:
@@ -116,12 +116,12 @@ class Amount:
|
||||
class Quantity:
|
||||
|
||||
def __init__(self, val, code):
|
||||
if not isinstance(val, int):
|
||||
raise ValueError('val expected int')
|
||||
if type(val) not in [float, int]:
|
||||
raise ValueError('val expected int or float')
|
||||
if code not in codelist.UnidadesMedida:
|
||||
raise ValueError("code [%s] not found" % (code))
|
||||
|
||||
self.value = val
|
||||
self.value = Amount(val)
|
||||
self.code = code
|
||||
|
||||
def __mul__(self, other):
|
||||
|
||||
Reference in New Issue
Block a user