Caros,
Como no post anterior, segue a base de ncms e o respectivo script para importar.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | static void loadNCMsFromFile(Args _args) { TaxFiscalClassification_BR buffer; Dialog dialog; DialogField dfFileName; TextIO inFile; RecordInsertList recordInsert = new RecordInsertList(tableNum(TaxFiscalClassification_BR)); Container line; ; delete_from buffer; dialog = new Dialog("Selecione o arquivo"); dfFileName = dialog.addField(typeId(FilenameOpen), "Selecione o arquivo"); if(!dialog.run()) return; inFile = new TextIO(dfFileName.value(), 'R'); inFile.inFieldDelimiter(";"); line = inFile.read(); while(line) { buffer.FiscalClassificationId = conpeek(line,1); buffer.Name = conpeek(line,2); buffer.IPITaxCode = 'IPI 0'; //hard coded porque é o que eu preciso. recordInsert.add(buffer); line = inFile.read(); } recordInsert.insertDatabase(); } |
[]s
Pichler
One Response
wakiga
08|Feb|2015 1I blog quite often and I truly thank you for your content.
Your article has really peaked my interest. I am going to
bookmark your site and keep checking for new details about once per week.
I subscribed to your RSS feed as well.
Leave a reply