#!/bin/bash

AREA=$1
CHECK=$2
TOTAL=$3
CLICKED_TAG=$4
MANUAL_TEXT=$5
CLERK=$6
CALLED_FROM=$7 # qp, moneycounter
FO_DOC_NUMBER=$8
REFUND_METHOD=$9

# tipos de estorno que nao queremos que a maquina de dinheiro processe
#   0 - estorna
#   1 - estorna e usa
#   2 - estorna e fatura a cliente
case $REFUND_METHOD in
[0-2]*)
  exit
;;
esac

# generate a random number between 1 and 2
NUM=`shuf -i1-2 -n1`

sleep 1

if [ $NUM -eq 1 ]; then
  echo "OK"
  echo "This will go the obs..."
  echo $AREA
  echo $CHECK
  echo $MANUAL_TEXT
else
  echo "ERROR<br>This is a big message with a lot of text just to make a trial"
fi

