Template:Infobox Recipe: Difference between revisions

m
fix third mat param
No edit summary
m (fix third mat param)
Line 1:
<includeonly>{{#vardefine:mat1cost|{{#if:{{{mat1|}}}|{{formatnum:{{#ask:[[{{{mat1}}}]]|?Value=|mainlabel=-}}|R}}|0}}}}{{#vardefine:mat2cost|{{#if:{{{mat2|}}}|{{formatnum:{{#ask:[[{{{mat2}}}]]|?Value=|mainlabel=-}}|R}}|0}}}}{{#vardefine:mat3cost|{{#if:{{{mat2|}}}|{{formatnum:{{#ask:[[{{{mat2}}}]]|?Value=|mainlabel=-}}|R}}|0}}}}{{#vardefine:mat2total|0}}{{#vardefine:mat3total|0}}{{#vardefine:output1cost|{{#if:{{{output1|}}}|{{formatnum:{{#ask:[[{{{output1}}}]]|?Value=|mainlabel=-}}|R}}|0}}}}{| class="wikitable"
! colspan="4" | Requirements
|-
Line 33:
{{!}} [[{{{mat3}}}]]
{{!}} style="text-align: right;" {{!}} {{{mat3qty|1}}}
{{!}} style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:mat2totalmat3total|{{#expr:{{{mat3qty|1}}} * {{#if:{{#var:mat3cost}}|{{#var:mat3cost}}|0}}}}}}}}
{{!}}-
}}
! colspan="3" | Total cost
| style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:totalcost|{{#expr:{{#varexists:mat1total|{{#var:mat1total}}|0}} + {{#varexists:mat2total|{{#var:mat2total}}|0}} + {{#varexists:mat3total|{{#var:mat3total}}|0}}}}}}}}
|-
! colspan="2" | Ouput
215

edits