#include <ctype.h>
#include <time.h>
#include <malloc.h>
+#include "latex.h"
#define DEFAULT_EURO
#ifndef DEFAULT_EURO
{"Currency", 127, 1, OPT},
{"Euro", 127, 1, OPT},
{"DM", 127, 1, OPT},
- {NULL, 0, 0}
+ {NULL, 0, 0, 0}
};
#define A_TRANS 0
#else
{"Betrag-DM", 50, 11, IGN},
#endif
- {NULL, 0, 0}
+ {NULL, 0, 0, 0}
};
#define C_NAME 0
#else
{"Summe-DM", 17, 13, IGN},
#endif
- {NULL, 0, 0}
+ {NULL, 0, 0, 0}
};
#define E_COUNT 0
fclose(fdtaus);
}
-int control2dtaus (char *ccontrol, char *cdtaus, char *cbeleg, char *ccheck)
+int control2dtaus (char *ccontrol, char *cdtaus, char *cbeleg, char *ccheck, char *latex)
{
FILE *fdtaus, *fcontrol, *fbeleg, *fcheck;
void *buf;
} else {
len = strlen(line);
if (recindex == C_VAL) {
- /* Convert commast to dots for later processing */
+ /* Convert commas to dots for later processing */
for (i=0; line[i]; i++) if (line[i] == ',') line[i] = '.';
- if ((cp = index (line, '.')) == NULL) {
+ if ((cp = strchr (line, '.')) == NULL) {
if (!(valC[recindex] = (char *)malloc (strlen(line)+4)))
return 0;
sprintf (valC[recindex], "%s.00", line);
fprintf (fbeleg, "\n Unsere Bankleitzahl ........: %s\n", valA[A_BLZ]);
fprintf (fbeleg, "\n\n\n\n\n __________________________________________________\n");
fprintf (fbeleg, " Ort, Datum Unterschrift\n");
+
+ if (latex)
+ generate_latex_receipt (latex, type, get_date(), date_todo,
+ currency, count,
+ ssum_val, ssum_kto, ssum_blz,
+ valA[A_KTO], valA[A_BLZ]);
+
for (recindex=0; recindex<A_LEN; recindex++)
if (valA[recindex])
free(valA[recindex]);