/*$Id: f1df_xml_strw.c,v 1.8 2013/08/13 06:09:34 sasa Exp $*/
/*14.04.2021	23.04.2007	Белых А.И.	f1df_xml_strw.c
Вывод строки в xml файл формы 1ДФ
*/
#include <ctype.h>
#include <stdio.h>

void f1df_xml_strw(int *nomer_xml_str,
const char *inn,
double sumadn,
double sumad,
double sumann,
double suman,
double suma_vsn,  /*сумма военного сбора начисленная*/
double suma_vsp,  /*сумма военного сбора перечисленная*/
const char *priz,
const char *data11,
const char *data21,
const char *lgotach,
const char *metka_zap,
FILE *ff_xml)
{
*nomer_xml_str+=1;
fprintf(ff_xml,"  <T1RXXXXG02 ROWNUM=\"%d\">%s</T1RXXXXG02>\n",*nomer_xml_str,inn);        //2
fprintf(ff_xml,"  <T1RXXXXG03A ROWNUM=\"%d\">%.2f</T1RXXXXG03A>\n",*nomer_xml_str,sumadn); //3a
fprintf(ff_xml,"  <T1RXXXXG03 ROWNUM=\"%d\">%.2f</T1RXXXXG03>\n",*nomer_xml_str,sumad);    //3
fprintf(ff_xml,"  <T1RXXXXG04A ROWNUM=\"%d\">%.2f</T1RXXXXG04A>\n",*nomer_xml_str,sumann); //4a
fprintf(ff_xml,"  <T1RXXXXG04 ROWNUM=\"%d\">%.2f</T1RXXXXG04>\n",*nomer_xml_str,suman);    //4
fprintf(ff_xml,"  <T1RXXXXG5A ROWNUM=\"%d\">%.2f</T1RXXXXG5A>\n",*nomer_xml_str,suma_vsn); //5a
fprintf(ff_xml,"  <T1RXXXXG5 ROWNUM=\"%d\">%.2f</T1RXXXXG5>\n",*nomer_xml_str,suma_vsp);   //5

fprintf(ff_xml,"  <T1RXXXXG05 ROWNUM=\"%d\">%s</T1RXXXXG05>\n",*nomer_xml_str,priz);       //6

if(data11[0] != '\0')
  fprintf(ff_xml,"  <T1RXXXXG06D ROWNUM=\"%d\">%s</T1RXXXXG06D>\n",*nomer_xml_str,data11); //7
if(data21[0] != '\0')
  fprintf(ff_xml,"  <T1RXXXXG07D ROWNUM=\"%d\">%s</T1RXXXXG07D>\n",*nomer_xml_str,data21); //8

if(isdigit(lgotach[0]) != 0)  /*Значит символ число*/
  fprintf(ff_xml,"  <T1RXXXXG08 ROWNUM=\"%d\">%s</T1RXXXXG08>\n",*nomer_xml_str,lgotach);  //9
/***************
if(metka_zap[0] != '\0')
  fprintf(ff_xml,"  <T1RXXXXG09 ROWNUM=\"%d\">%s</T1RXXXXG09>\n",*nomer_xml_str,metka_zap);//10
******************/

}
