Replies: 6 comments 4 replies
-
The The other maths functions should also he updated accordingly. Perhaps you want to submit a PR to fix this? |
Beta Was this translation helpful? Give feedback.
-
I would assume it could be as simple as:@register.simple_tag()
can i just try this locally? i mean if i edit inventree/InvenTree/report/templatetags/report.py and change it like that it does not seem to work when i run my template. or am i missing something? |
Beta Was this translation helpful? Give feedback.
-
well i think that is what i have. when i do but {% multiply PackQty Qty as TotalQty %} does not work, but should print 3000 |
Beta Was this translation helpful? Give feedback.
-
agree that works for me as well and but |
Beta Was this translation helpful? Give feedback.
-
I hear you but than why would these work: so in my undrstanding multiply of either works but together fails. That mentioned if i change the python code like mentioned above. should that work? i tried it by adding a new function but calling that new function already fails seems like the new function is not found when running the django. i have tried restarting Inventree baut that also had the same effect. even made a new function:
and
but calling both results in an error. am i missing something? |
Beta Was this translation helpful? Give feedback.
-
indeed that works. but you solved the mistery :-) thank you. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Body of the issue
Hi team,
in my PO i would like to multiply 2 variables but that fails.
in teh above i have: {% multiply Qty 1 as TotalQty %} which works but {% multiply Qty PackQty as TotalQty %} Fails mostlikly becaus these variables are strings and not numbers.
how can i get to what i aim for??
the idea is that it pirnt 3 Tape 1000 3000.
so at the moment only the multiply is missing and failing
pleae advice
Beta Was this translation helpful? Give feedback.
All reactions