X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fview_prescription.sh;h=78f995b97d425aa22ebe9c5df4354368addc4fd2;hp=df89cdba5b2db646fc1aeb666ebb5f4fea45cdf0;hb=9b13f7013dd882029ab3cf106d659a48243d910d;hpb=015242823eb4a79cf615bef6951b0af6bd0a5b01 diff --git a/templates/view_prescription.sh b/templates/view_prescription.sh index df89cdb..78f995b 100755 --- a/templates/view_prescription.sh +++ b/templates/view_prescription.sh @@ -18,7 +18,7 @@ check(){ [ "$1" = "$2" ] && printf checked} cat < +
${mpx[insurance]} @@ -69,21 +69,20 @@ cat <
- - - - -${mpx[quantity]} -${mpx[remidy]} -${mpx[quantity_weekly]} - - - - -${mpx[quantity1]} -${mpx[remidy1]} -${mpx[quantity_weekly1]} - + + + + ${mpx[quantity]} + ${mpx[remidy]} + ${mpx[quantity_weekly]} +$( for n in {0..10}; do + [ -n "${mpx[quantity$n]}" -o -n "${mpx[remidy$n]}" -o -n "${mpx[quantity_weekly$n]}" ] \ + && printf ' + %s + %s + %s + ' "${mpx[quantity$n]}" "${mpx[remidy$n]}" "${mpx[quantity_weekly$n]}" +done )