commit 2d66531a59103ad0a4a15a4c74ccc22189ae202b
parent 4609e54b37a764f1496f1d51adde88a0962538a0
Author: Dominik Schmidt <doeme@bastli.ethz.ch>
Date: Tue, 4 Sep 2018 22:37:34 +0200
Multiply the price with the amount on the single positions
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pipeline/10_JSON_to_GROFF.d b/pipeline/10_JSON_to_GROFF.d
@@ -28,7 +28,7 @@ void main(string[] argv){
string name=art["name"].str;
ulong amount=art["amount"].integer;
auto esc_name=name.replace("\\","\\\\").replace("\n","\n ");
- app.formattedWrite!"%d\tT{\n%s\nT}\t%.2f\n"(amount,esc_name,price);
+ app.formattedWrite!"%d\tT{\n%s\nT}\t%.2f\n"(amount,esc_name,price*amount);
total+=price * amount;
}
app~="\n";