For check arguments:

if [ $# -eq 0 ]
  then
    total "$receipts_files"
    exit
fi