Patch level : 12.0 1064
Files correlati : ve0.exe ve6.exe li0.exe li0100a.msk li0200a.msk li0300a.msk limenu.men Commento : Modificato calcolo plafond per lo sconto di testata Modificata la stampa della lista dichiarazioni Aggiuto flag in configurazione per considerare tutti i documenti fattura/ nota di credito i qualsiasi stato non bloccato Interno : Il flag viene testat prima della configurazione attuale, se non spuntato il programma si deve comportare come ora. il riepilogo lettere salvava aun file li0100a.ini nella cartella config che deve essere cancellato a mano
This commit is contained in:
parent
2377d63bb2
commit
3b5937c9ea
@ -156,10 +156,8 @@ bool TVisLI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
if (e == fe_init)
|
||||
{
|
||||
o.set(today.year());
|
||||
load_config();
|
||||
}
|
||||
break;
|
||||
|
||||
case F_TIPORIC:
|
||||
if( e == fe_modify)
|
||||
{
|
||||
@ -182,7 +180,6 @@ bool TVisLI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
// Creo una maschera che richiede la data
|
||||
TMask sto("li0700a");
|
||||
|
||||
|
||||
// Lancio la maschera
|
||||
sto.disable(F_ANNO_STO);
|
||||
sto.disable(F_FROM_CLI);
|
||||
@ -224,31 +221,6 @@ bool TVisLI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
return true;
|
||||
}
|
||||
|
||||
void TVisLI_mask::load_config()
|
||||
{
|
||||
TToken_string tipidoc(ini_get_string(CONFIG_DITTA, "li", "TIPIDOC"));
|
||||
TSheet_field &docs = sfield(DOCUMENTI_STATO);
|
||||
|
||||
docs.destroy();
|
||||
for (int i = 0; i < tipidoc.items(); i++)
|
||||
{
|
||||
TString td = tipidoc.get(i);
|
||||
TToken_string stati(ini_get_string(CONFIG_DITTA, "li", td));
|
||||
|
||||
for (int j = 0; j < stati.items(); j++)
|
||||
{
|
||||
|
||||
TToken_string s(stati.get(j), ',');
|
||||
const int r = docs.set_row_cell(F_TIPODOC_C, td);
|
||||
|
||||
docs.set_row_cell(F_STATODOCDA_C, s.get(0), r);
|
||||
docs.set_row_cell(F_STATODOCA_C, s.get(1), r);
|
||||
}
|
||||
}
|
||||
docs.force_update();
|
||||
}
|
||||
|
||||
|
||||
class TVisLI_app : public TSkeleton_application
|
||||
{
|
||||
public:
|
||||
|
@ -8,13 +8,8 @@
|
||||
#define F_ACODCF 408
|
||||
#define F_ARAGSOC 409
|
||||
|
||||
#define DOCUMENTI_STATO 201
|
||||
#define F_RIGHE 301
|
||||
|
||||
#define F_TIPODOC_C 101
|
||||
#define F_STATODOCDA_C 102
|
||||
#define F_STATODOCA_C 103
|
||||
|
||||
#define A_DATADOC 101
|
||||
#define A_ANNO 102
|
||||
#define A_NUMDOC 103
|
||||
@ -25,6 +20,7 @@
|
||||
#define A_CODCF 108
|
||||
#define A_RAGSOC 109
|
||||
#define A_TOTDOC 110
|
||||
|
||||
// Campi lettere intento
|
||||
#define START_PLA 111
|
||||
|
||||
|
@ -144,23 +144,6 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
SPREADSHEET DOCUMENTI_STATO 45 10
|
||||
BEGIN
|
||||
PROMPT 18 10 ""
|
||||
ITEM "Tipo Numerazione"
|
||||
ITEM "Da stato"
|
||||
ITEM "A stato"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING DLG_PROFILE 256
|
||||
BEGIN
|
||||
PROMPT -1 -1 "Profilo "
|
||||
PSELECT
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Documenti/Lettere Intento" 0 2 0 0
|
||||
@ -204,31 +187,6 @@ ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "Riga tipo numerazione" -1 -1 78 8
|
||||
|
||||
STRING F_TIPODOC_C 4
|
||||
BEGIN
|
||||
PROMPT 2 1 "Tipo Documento "
|
||||
FIELD TIPODOC
|
||||
END
|
||||
|
||||
STRING F_STATODOCDA_C 4
|
||||
BEGIN
|
||||
PROMPT 2 2 "Da Numerazione "
|
||||
FIELD CODTAB
|
||||
|
||||
END
|
||||
|
||||
STRING F_STATODOCA_C 4
|
||||
BEGIN
|
||||
PROMPT 2 3 "A Numerazione "
|
||||
FIELD CODTAB
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "Riga" -1 -1 69 14
|
||||
|
||||
DATE A_DATADOC
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <automask.h>
|
||||
#include <defmask.h>
|
||||
#include <relapp.h>
|
||||
#include <reprint.h>
|
||||
#include <tabutil.h>
|
||||
#include <filetext.h>
|
||||
#include "..\ve\velib.h"
|
||||
@ -13,177 +14,35 @@
|
||||
|
||||
#define CONFIG_DICINT "DICINT.ini"
|
||||
|
||||
class TResDI_mask : public TAutomask
|
||||
|
||||
class TLista_dichiarazioni : public TSkeleton_application
|
||||
{
|
||||
private:
|
||||
TSheet_field& sheet; // Sheet
|
||||
|
||||
public:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) { return true; };
|
||||
TResDI_mask() : TAutomask("li0200a"), sheet(sfield(DOCUMENTI_STATO)) { load_config(); };
|
||||
void load_config();
|
||||
void elabTipiDoc(TToken_string& tipi, TToken_string& stati, TToken_string& tipif, TToken_string& statif);
|
||||
};
|
||||
|
||||
void TResDI_mask::load_config()
|
||||
{
|
||||
//Anno
|
||||
set(F_A_DATA, TDate(TODAY));
|
||||
|
||||
set(F_TABIVA_CODTAB, ini_get_string(CONFIG_DITTA, "li", "CODIVA"));
|
||||
TToken_string tipidoc(ini_get_string(CONFIG_DITTA, "li", "TIPIDOC"));
|
||||
|
||||
TString_array& strarr = sheet.rows_array();
|
||||
sheet.hide();
|
||||
sheet.destroy();
|
||||
|
||||
for(int i = 0; i < tipidoc.items(); i++)
|
||||
{
|
||||
TString td = tipidoc.get(i);
|
||||
TToken_string stati(ini_get_string(CONFIG_DITTA, "li", td));
|
||||
for(int j = 0; j < stati.items(); j++)
|
||||
{
|
||||
TToken_string row, s(stati.get(j), ',');
|
||||
row.add(td);
|
||||
row.add(s.get(0));
|
||||
row.add(s.get(1));
|
||||
strarr.add(row);
|
||||
}
|
||||
}
|
||||
sheet.force_update();
|
||||
sheet.show();
|
||||
}
|
||||
|
||||
void TResDI_mask::elabTipiDoc(TToken_string& tipi, TToken_string& stati, TToken_string& tipif, TToken_string& statif)
|
||||
{
|
||||
bool fattura;
|
||||
TString tipo;
|
||||
for(int i = 0; i < sheet.items(); i++)
|
||||
{
|
||||
TToken_string row = sheet.row(i); // Es. "F01|1|5"
|
||||
int statoin = row.get_int(1), statoout = row.get_int(2);
|
||||
tipo = row.get(0);
|
||||
|
||||
if(cache().get("%TIP", tipo).get_int("I1") == 2) // Se il tipo è una fattura
|
||||
fattura = true;
|
||||
else
|
||||
fattura = false;
|
||||
|
||||
for(; statoin <= statoout; statoin++)
|
||||
{
|
||||
// Aggiornamento: Ci sono 4 token string ora, due per le fatture e due per il resto.
|
||||
// Immetto nelle due TToken_string i valori per gestire la classe TLista_documenti
|
||||
// Per ogni posizione metto il documento e stato interessato, es. F01: da 1 a 3 -> tipi {F01|F01|F01} stati {1|2|3}
|
||||
if (fattura)
|
||||
{
|
||||
tipif.add(tipo);
|
||||
statif.add(statoin);
|
||||
}
|
||||
else
|
||||
{
|
||||
tipi.add(tipo);
|
||||
stati.add(statoin);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class TResDI_app : public TSkeleton_application
|
||||
{
|
||||
void elab(TResDI_mask& m);
|
||||
void elab(TSimpleAutomask& m);
|
||||
public:
|
||||
virtual void main_loop();
|
||||
};
|
||||
|
||||
void TResDI_app::elab(TResDI_mask& m)
|
||||
void TLista_dichiarazioni::elab(TSimpleAutomask& m)
|
||||
{
|
||||
int clifoda = m.get_long(F_CODICE_CLIFO_DA);
|
||||
int clifoa = m.get_long(F_CODICE_CLIFO_A);
|
||||
TDate aData(m.get_date(F_A_DATA));
|
||||
|
||||
// Creo le TToken_string necessarie per filtrare i documenti
|
||||
TToken_string tipi, stati, tipif, statif;
|
||||
m.elabTipiDoc(tipi, stati, tipif, statif);
|
||||
TProgram_report rep("li0200a");
|
||||
TReport_book book;
|
||||
|
||||
TRelation r_clifo(LF_CLIFO);
|
||||
TRectype fil_from(r_clifo.curr()), fil_to(r_clifo.curr());
|
||||
fil_from.put("TIPOCF", "C");
|
||||
fil_to.put("TIPOCF", "C");
|
||||
|
||||
if(clifoda > 0)
|
||||
fil_from.put("CODCF", clifoda);
|
||||
|
||||
if(clifoa > 0)
|
||||
fil_to.put("CODCF", clifoa);
|
||||
|
||||
TCursor c_clifo(&r_clifo, "", 1, &fil_from, &fil_to);
|
||||
|
||||
TLog_report log(TR("Resoconto plafond"));
|
||||
for(c_clifo = 0; c_clifo.pos() < c_clifo.items(); ++c_clifo)
|
||||
{
|
||||
TRectype row_clifo(c_clifo.curr());
|
||||
|
||||
TLi_manager cli(row_clifo.get_long("CODCF"), aData.year()); // Inizializzo l'oggetto per la gestione del plafond
|
||||
|
||||
if (cli.has_valid_plafond())
|
||||
{
|
||||
TArray arr = cli.get_plafond_array();
|
||||
const int rows = arr.items();
|
||||
|
||||
for (int r = 0; r < rows; r++)
|
||||
{
|
||||
const TRectype & reclint = (const TRectype &) arr[r];
|
||||
const int numprot = reclint.get_int(LETINT_NUMPROT);
|
||||
real plafond = reclint.get_real(LETINT_IMPORTO);
|
||||
real utilizzato = reclint.get_real(LETINT_UTILIZZATO);
|
||||
real residuo = plafond - utilizzato;
|
||||
const int tipo = reclint.get_int(LETINT_TIPOOP);
|
||||
const TDate dal = reclint.get_date(LETINT_DAL);
|
||||
const TDate al = reclint.get_date(LETINT_AL);
|
||||
TString msg;
|
||||
|
||||
msg << TR("Dichiarazione di intento cliente ") << row_clifo.get_long(CLI_CODCF) << " - "<< row_clifo.get(CLI_RAGSOC) << '\n';
|
||||
log.log(0, msg);
|
||||
msg.cut(0) << TR("Protocollo: ") << numprot << " - " << TR("Plafond disponibile: ") << residuo << "€" << '\n';
|
||||
log.log(0, msg);
|
||||
msg.cut(0) << TR("Tipo dichiarazione: ");
|
||||
switch (tipo)
|
||||
{
|
||||
case SOLUZIONE_UNICA:
|
||||
msg << TR("Singola") << '\n';
|
||||
break;
|
||||
case FINO_A_PLAFOND:
|
||||
msg << TR("A concorrenza ") << TR("Dal ") << dal << '\n';
|
||||
break;
|
||||
case A_TEMPO:
|
||||
msg << TR("Dal ") << dal << TR("Al ") << al << '\n';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
log.log(0, msg);
|
||||
log.log(0, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
log.print_or_preview();
|
||||
rep.mask2report(m);
|
||||
book.add(rep);
|
||||
rep.print_or_preview();
|
||||
}
|
||||
|
||||
|
||||
void TResDI_app::main_loop()
|
||||
void TLista_dichiarazioni::main_loop()
|
||||
{
|
||||
TResDI_mask m;
|
||||
TSimpleAutomask m("li0200a");
|
||||
|
||||
while (m.run() == K_ENTER)
|
||||
{
|
||||
elab(m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int li0200(int argc, char* argv[])
|
||||
{
|
||||
TResDI_app a;
|
||||
TLista_dichiarazioni a;
|
||||
a.run(argc, argv, TR("Stato lettere di intento"));
|
||||
return 0;
|
||||
}
|
@ -1,10 +1,3 @@
|
||||
#define F_TIPODOC 101
|
||||
#define F_STATODOCDA 102
|
||||
#define F_STATODOCA 103
|
||||
|
||||
#define DOCUMENTI_STATO 201
|
||||
|
||||
#define F_TABIVA_CODTAB 301
|
||||
#define F_A_DATA 303
|
||||
#define F_CODICE_CLIFO_DA 304
|
||||
#define F_CODICE_CLIFO_A 305
|
||||
#define F_ANNO 101
|
||||
#define F_CODCLI_DA 102
|
||||
#define F_CODCLI_A 103
|
132
src/li/li0200a.rep
Normal file
132
src/li/li0200a.rep
Normal file
@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report libraries="" page_merge="" save_printer="" name="li0200a" use_printer_font="" orientation="2" page_split="" lpi="6" command="" class="">
|
||||
<description>registro dichiarazioni d'intento</description>
|
||||
<font face="Arial" size="8" />
|
||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
|
||||
<field deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
<prescript description="H0.0 PRESCRIPT">"!RAGSOC"
|
||||
GET_FIRM_DATA</prescript>
|
||||
</field>
|
||||
<field x="161" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Pag." />
|
||||
<field x="165" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>#PAGE</source>
|
||||
<prescript description="H0.0 PRESCRIPT">#REPORT.PAGE</prescript>
|
||||
</field>
|
||||
<field y="1.5" deactivated="" type="Stringa" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="170" codval="" height="2" id="" pattern="1" hide_zero="" text="">
|
||||
<font face="Arial" bold="1" size="14" />
|
||||
<postscript description="H0.0 POSTSCRIPT">"Riepilogo dichiarazioni di intento "
|
||||
#ANNO @
|
||||
0
|
||||
C;E;
|
||||
IF
|
||||
#ANNO @
|
||||
+
|
||||
THEN
|
||||
#THIS !
|
||||
</postscript>
|
||||
</field>
|
||||
<field border="1" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="170" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||
<field border="2" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field y="4" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="20" codval="" height="2" id="" pattern="1" hide_zero="" text="Ricevimento dichiarazione">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field border="1" x="20" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field border="1" x="80" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field border="1" x="93" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field border="1" x="110" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field border="1" x="128" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field border="1" x="148" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field border="1" x="166" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field border="1" x="170" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="3" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="92" y="4.5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="19" codval="" height="2" id="" pattern="1" hide_zero="" text="Tipo dichiarazione">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="109.5" y="4.5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="19" codval="" height="2" id="" pattern="1" hide_zero="" text="Limiti dichiarazione">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="136" y="4.5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" height="2" id="" pattern="1" hide_zero="" text="Plafond">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="154" y="4.5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="12" codval="" height="2" id="" pattern="1" hide_zero="" text="Disponibile">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="21" y="4.75" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="57" codval="" height="1.25" id="" pattern="1" hide_zero="" text="Dichiarante o fornitore F; prestatore">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="81" y="5" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="1" hide_zero="" text="Partita IVA">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="167" y="5" deactivated="" type="Testo" valign="center" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="Ch.">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field y="5.75" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Data">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="10" y="5.75" deactivated="" type="Testo" valign="center" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Protocollo">
|
||||
<font face="Arial Narrow" bold="1" size="10" />
|
||||
</field>
|
||||
<field border="1" y="7" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="170" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||
</section>
|
||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1" />
|
||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
|
||||
<field x="1" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>DATAREG</source>
|
||||
</field>
|
||||
<field x="12" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>NUMPROT</source>
|
||||
</field>
|
||||
<field border="1" x="20" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="22" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>CODCLI</source>
|
||||
</field>
|
||||
<field x="29" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>CLIFO.RAGSOC</source>
|
||||
</field>
|
||||
<field border="1" x="80" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="81.5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>CLIFO.PAIV</source>
|
||||
</field>
|
||||
<field border="1" x="93.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="94" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>154.TIPOOP</source>
|
||||
<list>
|
||||
<li Value="Singola" Code="1">MESSAGE SHOW,10@|HIDE,20@</li>
|
||||
<li Value="A concorrenza" Code="2">MESSAGE SHOW,10@|HIDE,20@</li>
|
||||
<li Value="Nel Periodo" Code="3">MESSAGE SHOW,20@|HIDE,10@</li>
|
||||
</list>
|
||||
</field>
|
||||
<field border="1" x="110" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="110.5" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="8" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>154.DAL</source>
|
||||
</field>
|
||||
<field x="119.5" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="8" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>154.AL</source>
|
||||
</field>
|
||||
<field border="1" x="128" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="128.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="###.###.###,@@">
|
||||
<groups>10</groups>
|
||||
<source>154.IMPORTO</source>
|
||||
</field>
|
||||
<field border="1" x="148" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="149" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="###.###.###,@@">
|
||||
<source>154.IMPORTO-154.UTILIZZATO</source>
|
||||
</field>
|
||||
<field border="1" x="166" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="168" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="1" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>154.CHIUSA</source>
|
||||
</field>
|
||||
<field border="1" x="170" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
|
||||
</section>
|
||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="1" type="Foot" level="" hidden="" height="5" page_break="" can_break="" pattern="1">
|
||||
<field border="1" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="170" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||
</section>
|
||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" height="5" page_break="" can_break="" pattern="1">
|
||||
<field border="1" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="170" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||
</section>
|
||||
<sql>USE 154 SELECT BETWEEN(CODCLI,#F_CODCLI,#T_CODCLI)
|
||||
JOIN CLIFO INTO TIPOCF=='C' CODCF==CODCLI
|
||||
FROM ANNO=#ANNO
|
||||
TO ANNO=#ANNO</sql>
|
||||
</report>
|
@ -4,137 +4,46 @@ TOOLBAR "topbar" 0 0 0 2
|
||||
#include <stdbar.h>
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Impostazioni dichiarazioni d'intento" 0 2 0 0
|
||||
PAGE "Riepilogo dichiarazioni di intento" 0 2 0 0
|
||||
|
||||
STRING F_TABIVA_CODTAB 4
|
||||
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 1 1 "Codice IVA plafond:"
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %IVA
|
||||
FLAGS "U"
|
||||
INPUT CODTAB F_TABIVA_CODTAB
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Tipo" S1
|
||||
DISPLAY "%@5" R0
|
||||
DISPLAY "Vent." S6
|
||||
DISPLAY "Sospeso" B2
|
||||
OUTPUT F_TABIVA_CODTAB CODTAB
|
||||
HELP "Inserire il codice IVA"
|
||||
CHECKTYPE REQUIRED
|
||||
VALIDATE ZEROFILL_FUNC 2
|
||||
PROMPT 1 2 "Anno : "
|
||||
FLAGS "A"
|
||||
FIELD ANNO
|
||||
END
|
||||
|
||||
DATE F_A_DATA
|
||||
NUMBER F_CODCLI_DA 6
|
||||
BEGIN
|
||||
PROMPT 1 2 "A data "
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_CODICE_CLIFO_DA 6
|
||||
BEGIN
|
||||
PROMPT 1 3 "Da cod. cliente: "
|
||||
PROMPT 1 3 "Da cliente : "
|
||||
FLAG "UR"
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_CODICE_CLIFO_DA
|
||||
INPUT CODCF F_CODCLI_DA
|
||||
DISPLAY "Cliente" CODCF
|
||||
DISPLAY "Ragione sociale@60" RAGSOC
|
||||
OUTPUT F_CODICE_CLIFO_DA CODCF
|
||||
OUTPUT F_CODCLI_DA CODCF
|
||||
FIELD F_CODCLI
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
NUMBER F_CODICE_CLIFO_A 6
|
||||
NUMBER F_CODCLI_A 6
|
||||
BEGIN
|
||||
PROMPT 32 3 "a: "
|
||||
PROMPT 32 3 "a : "
|
||||
FLAG "UR"
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_CODICE_CLIFO_A
|
||||
COPY DISPLAY F_CODICE_CLIFO_DA
|
||||
OUTPUT F_CODICE_CLIFO_A CODCF
|
||||
NUM_EXPR #F_CODICE_CLIFO_A>=#F_CODICE_CLIFO_DA
|
||||
INPUT CODCF F_CODCLI_A
|
||||
COPY DISPLAY F_CODCLI_DA
|
||||
OUTPUT F_CODCLI_A CODCF
|
||||
NUM_EXPR #F_CODCLI_A>=#F_CODCLI_DA
|
||||
WARNING "Digitare un codice maggiore o uguale al campo 'da codice cliente'"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
SPREADSHEET DOCUMENTI_STATO 45 10
|
||||
BEGIN
|
||||
PROMPT 1 5 ""
|
||||
ITEM "Tipo Numerazione"
|
||||
ITEM "Da stato"
|
||||
ITEM "A stato"
|
||||
FIELD T_CODCLI
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "Riga tipo numerazione" -1 -1 78 8
|
||||
|
||||
STRING F_TIPODOC 4
|
||||
BEGIN
|
||||
PROMPT 2 1 "Tipo Documento "
|
||||
FIELD TIPODOC
|
||||
HELP "Codice tipo documento"
|
||||
USE %TIP
|
||||
INPUT CODTAB F_TIPODOC
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_TIPODOC CODTAB
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_STATODOCDA 4
|
||||
BEGIN
|
||||
PROMPT 2 2 "Da Numerazione "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %STD
|
||||
FLAGS "U"
|
||||
INPUT CODTAB F_STATODOCA
|
||||
DISPLAY "Stato" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_STATODOCDA CODTAB
|
||||
//CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_STATODOCA 4
|
||||
BEGIN
|
||||
PROMPT 2 3 "A Numerazione "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %STD
|
||||
FLAGS "U"
|
||||
INPUT CODTAB F_STATODOCA
|
||||
DISPLAY "Stato" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_STATODOCA CODTAB
|
||||
NUM_EXPR #F_STATODOCA>=#F_STATODOCDA
|
||||
//CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "Documento" 0 0 0 2
|
||||
|
||||
BUTTON DLG_OK 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
ENDMASK
|
@ -16,7 +16,7 @@ private:
|
||||
|
||||
public:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
TDI_mask() : TAutomask("li0300a"), sheet(sfield(DOC_STATO)) { load_config(); };
|
||||
TDI_mask() : TAutomask("li0300a"), sheet(sfield(F_DOC_SHEET)) { load_config(); };
|
||||
void load_config();
|
||||
void save_config();
|
||||
|
||||
@ -26,12 +26,12 @@ bool TDI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
{
|
||||
case FLD_TABIVA_CODTAB:
|
||||
case FLD_TABIVA_CODTAB_ALT:
|
||||
case F_CODIVA:
|
||||
case F_CODIVA_ALT:
|
||||
{
|
||||
if(e == fe_modify)
|
||||
{
|
||||
TString codiva = get(FLD_TABIVA_CODTAB), codiva2 = get(FLD_TABIVA_CODTAB_ALT);
|
||||
TString codiva = get(F_CODIVA), codiva2 = get(F_CODIVA_ALT);
|
||||
if(codiva == codiva2)
|
||||
{
|
||||
error_box("Attenzione! Questo codice è già stato inserito");
|
||||
@ -48,8 +48,9 @@ bool TDI_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
|
||||
void TDI_mask::load_config()
|
||||
{
|
||||
set(FLD_TABIVA_CODTAB, ini_get_string(CONFIG_DITTA, "li", "CODIVA"));
|
||||
set(FLD_TABIVA_CODTAB_ALT, ini_get_string(CONFIG_DITTA, "li", "CODIVALT"));
|
||||
set(F_CODIVA, ini_get_string(CONFIG_DITTA, "li", "CODIVA"));
|
||||
set(F_CODIVA_ALT, ini_get_string(CONFIG_DITTA, "li", "CODIVALT"));
|
||||
set(F_ENABLE_FATTURE, ini_get_bool(CONFIG_DITTA, "li", "ENABLEFATT"));
|
||||
TToken_string tipidoc(ini_get_string(CONFIG_DITTA, "li", "TIPIDOC"));
|
||||
|
||||
TString_array& strarr = sheet.rows_array();
|
||||
@ -86,8 +87,9 @@ void TDI_mask::save_config()
|
||||
val.add(row.get(2));
|
||||
ini_set_string(CONFIG_DITTA, "li", row.get(0), val);
|
||||
}
|
||||
ini_set_string(CONFIG_DITTA, "li", "CODIVA", get(FLD_TABIVA_CODTAB));
|
||||
ini_set_string(CONFIG_DITTA, "li", "CODIVALT", get(FLD_TABIVA_CODTAB_ALT));
|
||||
ini_set_string(CONFIG_DITTA, "li", "CODIVA", get(F_CODIVA));
|
||||
ini_set_string(CONFIG_DITTA, "li", "CODIVALT", get(F_CODIVA_ALT));
|
||||
ini_set_bool(CONFIG_DITTA, "li", "ENABLEFATT", get_bool(F_ENABLE_FATTURE));
|
||||
ini_set_string(CONFIG_DITTA, "li", "TIPIDOC", tipidoc);
|
||||
message_box(TR("Impostazioni salvate correttamente"));
|
||||
}
|
||||
@ -102,15 +104,13 @@ void TDISettings_app::main_loop()
|
||||
{
|
||||
TDI_mask m;
|
||||
while (m.run() == K_SAVE)
|
||||
{
|
||||
m.save_config();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int li0300(int argc, char* argv[])
|
||||
{
|
||||
TDISettings_app a;
|
||||
a.run(argc, argv, TR("Lettere d'intento"));
|
||||
a.run(argc, argv, TR("Configurazione lettere d'intento"));
|
||||
return 0;
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
#define FLD_TIPODOC 101
|
||||
#define FLD_STATODOCDA 102
|
||||
#define FLD_STATODOCA 103
|
||||
#define S_TIPODOC 101
|
||||
#define S_STATODOCDA 102
|
||||
#define S_STATODOCA 103
|
||||
|
||||
#define DOC_STATO 201
|
||||
|
||||
#define FLD_TABIVA_CODTAB 301
|
||||
#define FLD_TABIVA_CODTAB_ALT 302
|
||||
#define F_CODIVA 201
|
||||
#define F_CODIVA_ALT 202
|
||||
#define F_ENABLE_FATTURE 203
|
||||
#define F_DOC_SHEET 204
|
@ -13,50 +13,55 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Impostazioni dichiarazioni d'intento" 0 2 0 0
|
||||
PAGE "Cofigurazione dichiarazioni d'intento" 0 2 0 0
|
||||
|
||||
STRING FLD_TABIVA_CODTAB 4
|
||||
STRING F_CODIVA 4
|
||||
BEGIN
|
||||
PROMPT 2 1 "Codice IVA plafond: "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %IVA
|
||||
FLAGS "U"
|
||||
INPUT CODTAB FLD_TABIVA_CODTAB
|
||||
INPUT CODTAB F_CODIVA
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Tipo" S1
|
||||
DISPLAY "%@5" R0
|
||||
DISPLAY "Vent." S6
|
||||
DISPLAY "Sospeso" B2
|
||||
OUTPUT FLD_TABIVA_CODTAB CODTAB
|
||||
OUTPUT F_CODIVA CODTAB
|
||||
HELP "Inserire il codice IVA"
|
||||
CHECKTYPE REQUIRED
|
||||
VALIDATE ZEROFILL_FUNC 2
|
||||
END
|
||||
|
||||
STRING FLD_TABIVA_CODTAB_ALT 4
|
||||
STRING F_CODIVA_ALT 4
|
||||
BEGIN
|
||||
PROMPT 2 2 "Codice IVA alternativo: "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %IVA
|
||||
FLAGS "U"
|
||||
INPUT CODTAB FLD_TABIVA_CODTAB
|
||||
INPUT CODTAB F_CODIVA_ALT
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Tipo" S1
|
||||
DISPLAY "%@5" R0
|
||||
DISPLAY "Vent." S6
|
||||
DISPLAY "Sospeso" B2
|
||||
OUTPUT FLD_TABIVA_CODTAB_ALT CODTAB
|
||||
OUTPUT F_CODIVA_ALT CODTAB
|
||||
HELP "Inserire il codice IVA"
|
||||
VALIDATE ZEROFILL_FUNC 2
|
||||
END
|
||||
|
||||
SPREADSHEET DOC_STATO 45 10
|
||||
BOOLEAN F_ENABLE_FATTURE
|
||||
BEGIN
|
||||
PROMPT 2 4 ""
|
||||
PROMPT 2 2 "Considera attivi tutti i documenti fattura e nota di credito"
|
||||
END
|
||||
|
||||
SPREADSHEET F_DOC_SHEET 45 -1
|
||||
BEGIN
|
||||
PROMPT 2 6 ""
|
||||
ITEM "Tipo Documento"
|
||||
ITEM "Da stato"
|
||||
ITEM "A stato"
|
||||
@ -68,46 +73,42 @@ ENDMASK
|
||||
|
||||
PAGE "Riga tipo numerazione" -1 -1 78 8
|
||||
|
||||
STRING FLD_TIPODOC 4
|
||||
STRING S_TIPODOC 4
|
||||
BEGIN
|
||||
PROMPT 2 1 "Tipo Documento "
|
||||
FIELD TIPODOC
|
||||
HELP "Codice tipo documento"
|
||||
USE %TIP
|
||||
INPUT CODTAB FLD_TIPODOC
|
||||
INPUT CODTAB S_TIPODOC
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT FLD_TIPODOC CODTAB
|
||||
OUTPUT S_TIPODOC CODTAB
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING FLD_STATODOCDA 4
|
||||
STRING S_STATODOCDA 4
|
||||
BEGIN
|
||||
PROMPT 2 2 "Da Numerazione "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %STD
|
||||
FLAGS "U"
|
||||
INPUT CODTAB FLD_STATODOCA
|
||||
INPUT CODTAB S_STATODOCA
|
||||
DISPLAY "Stato" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT FLD_STATODOCDA CODTAB
|
||||
//CHECKTYPE REQUIRED
|
||||
OUTPUT S_STATODOCDA CODTAB
|
||||
END
|
||||
|
||||
STRING FLD_STATODOCA 4
|
||||
STRING S_STATODOCA 4
|
||||
BEGIN
|
||||
PROMPT 2 3 "A Numerazione "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %STD
|
||||
FLAGS "U"
|
||||
INPUT CODTAB FLD_STATODOCA
|
||||
INPUT CODTAB S_STATODOCA
|
||||
DISPLAY "Stato" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT FLD_STATODOCA CODTAB
|
||||
NUM_EXPR #FLD_STATODOCA>=#FLD_STATODOCDA
|
||||
//CHECKTYPE REQUIRED
|
||||
OUTPUT S_STATODOCA CODTAB
|
||||
NUM_EXPR #S_STATODOCA>=#S_STATODOCDA
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -173,16 +173,15 @@ bool TPrint_letint_mask::ask_service_pwd()
|
||||
//---------------------------------------------------------------
|
||||
// REPORT
|
||||
//---------------------------------------------------------------
|
||||
class TLetint_report : public TReport
|
||||
class TLetint_report : public TProgram_report
|
||||
{
|
||||
word _last_printed_page;
|
||||
|
||||
protected:
|
||||
virtual bool use_mask() { return false; }
|
||||
virtual word last_printed_page() const { return _last_printed_page; }
|
||||
|
||||
public:
|
||||
TLetint_report(int last_printed_page) : _last_printed_page(last_printed_page) {}
|
||||
TLetint_report(int last_printed_page) : TProgram_report("li0500a") , _last_printed_page(last_printed_page) {}
|
||||
~TLetint_report() {}
|
||||
};
|
||||
|
||||
@ -278,7 +277,6 @@ void TPrint_letint::main_loop()
|
||||
path = m.get(F_REPORT);
|
||||
if (path.empty())
|
||||
path = "li0500a";
|
||||
rep.load(path);
|
||||
rep.mask2report(m);
|
||||
|
||||
|
||||
|
@ -46,12 +46,15 @@ const TString & make_key(const int anno, const int numplaf)
|
||||
|
||||
static TToken_string __tipidoc;
|
||||
static TToken_string __statidoc;
|
||||
static bool __enable_fatture = false;
|
||||
|
||||
void get_tipi_stati()
|
||||
{
|
||||
if (__tipidoc.blank())
|
||||
{
|
||||
TToken_string tipidoc = (TToken_string &)ini_get_string(CONFIG_DITTA, "li", "TIPIDOC");
|
||||
__enable_fatture = ini_get_bool(CONFIG_DITTA, "li", "ENABLE_FATTURE");
|
||||
|
||||
TToken_string tipidoc = (TToken_string &)ini_get_string(CONFIG_DITTA, "li", "TIPIDOC");
|
||||
|
||||
for (const char * tipo = tipidoc.get(0); tipo && *tipo; tipo = tipidoc.get())
|
||||
{
|
||||
@ -528,10 +531,18 @@ void TLi_manager::read(const char t, const long c, TDate inidic, TDate findic)
|
||||
|
||||
bool TLi_manager::doc_ok(const TDocumento & doc) const
|
||||
{
|
||||
const TString8 tipodoc = doc.tipo().codice();
|
||||
const TString8 tipodoc = doc.tipo().codice();
|
||||
const TString4 stato = doc.get(DOC_STATO);
|
||||
|
||||
return (tipi().find(tipodoc) >= 0) && (stati().find(stato) >= 0);
|
||||
if (__enable_fatture)
|
||||
{
|
||||
if (doc.tipo().is_fattura())
|
||||
return doc.tipo().stato_bloccato() <= ' ' || stato[0] < doc.tipo().stato_bloccato();
|
||||
else
|
||||
return (tipi().find(tipodoc) >= 0) && (doc.tipo().stato_bloccato() <= ' ' || stato[0] < doc.tipo().stato_bloccato());
|
||||
}
|
||||
else
|
||||
return (tipi().find(tipodoc) >= 0) && (stati().find(stato) >= 0);
|
||||
}
|
||||
|
||||
bool TLi_manager::plafond_write(TDocumento& d)
|
||||
|
@ -5,8 +5,8 @@ Module = 16
|
||||
Flags = "F"
|
||||
Item_01 = "Dichiarazioni d'intento", "li0 -3", ""
|
||||
Item_02 = "Stampa dichiarazioni", "li0 -4", ""
|
||||
Item_03 = "Riepilogo dichiarazioni", "li0 -1", ""
|
||||
Item_03 = "Riepilogo dichiarazioni d'intento", "li0 -1", ""
|
||||
Item_04 = "Riepilogo Documenti/Lettere", "li0 -0", ""
|
||||
Item_05 = "Ricostruzione Plafond Lettere", "li0 -6", ""
|
||||
Item_06 = "Impostazioni", "li0 -2", ""
|
||||
Item_06 = "Configurazione modulo, "li0 -2", ""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user