diff --git a/ha/ha2200.cpp b/ha/ha2200.cpp index 7bf591d54..c7f162c97 100755 --- a/ha/ha2200.cpp +++ b/ha/ha2200.cpp @@ -610,12 +610,17 @@ void THardy_esselunga_fat::add_recs_dettaglio(TFatture_recordset& fat, TDocument tipo_hardy = "E"; fat.set("TAX.CATIMP", tipo_hardy); // gestione sconto riga - real sconto = rigadoc->sconto(); + const real sconto = rigadoc->sconto(); if (!sconto.is_zero()) { fat.new_rec("ALD"); - TString8 str = sconto.stringa(8,4,'0'); - str.strip(","); + fat.set("ALD.IMPORTO", sconto); + + TString80 str; + real perc; + scontoexpr2perc(rigadoc->get(RDOC_SCONTO), false, str, perc); + str = perc.string(8,4,'0'); + str.strip("." ); fat.set("ALD.PERC", str); } fat.new_rec("NAD");