Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 19 su 19
  1. #11

    Up

    Nessun consiglio?

  2. #12
    mi incolli l XML sul quale applichi l XSLT ? per farlo non è difficile ma i cicli che hai copiato hanno dei path sbagliati ! si riferiscono a un ARTICLES che nell xml che hai incollato non si trova

    esattamente <xsl:for-each select="articles/group">

    mi serve l xml che ha dentro questi articles senno non posso far niente ...

    porta pazienza e fammi un copia incolla di :

    - XML coi dati
    - XSL che applichi a quell XML

  3. #13
    Grazie a te per la pazienza invece.
    Se avessi il modo di allegare i file di testo sarebbe molto più comodo.
    Ti incollo il file "Trace" dal quale l'XSL prende i dati:

    codice:
    04:00:00.546 Admin started, version: 4.3.49.0
    04:00:00.609 AppStarter not specified, cannot start updater
    04:00:00.781 RefreshServerVersion
    04:00:00.875 Report scheduler instantiated.
    04:00:00.875 Generating report Report.ArticleAnalisys.ArticleAnalisysForm
    04:00:00.875 Report generation started on 13.07.2011 04:00:00
    04:00:00.968 Report type found in assembly C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.ArticleAnalisys.dll 
    04:00:01.703 Generating report Report.ArticleAnalisys.ArticleAnalisysForm using parameters set 'GTN'
    04:00:04.281 Retrieving report data for table 'articles_data', sql is:
    *****************
    SELECT g.code group_code,
    g.description group_description,
    a.code article_code,
    a.description article_description,
    a.notes1 article_notes1,
    a.notes2 article_notes2,
    a.notes3 article_notes3,
    SUM(ta.price) amount_sold,
    SUM(ta.price + COALESCE(ta.discount,0) + COALESCE(ta.promotion_discount,0)) amount_net,
    SUM(CASE WHEN a.measure_unit=1 THEN ta.qty_weight ELSE SIGN(ta.qty_weight) END) pieces_sold,
    SUM(CASE WHEN a.measure_unit=2 THEN ta.qty_weight ELSE NULL END) weight_sold,
    SUM(ta.price) average_price,
    SUM(COALESCE(ta.discount,0) + COALESCE(ta.promotion_discount,0)) amount_discounted,
    SUM(COALESCE(ta.discount,0) + COALESCE(ta.promotion_discount,0)) average_discount,
    SUM(COALESCE (ta.reference_price, ta.price)) reference_price,
    SUM(COALESCE(ta.reference_price,ta.price)) reference_price_percent,
    NULL amount_percent,
    ta.uom_id UOM_id,
    uom.display_description UOM_display_description
    FROM trans_articles ta LEFT JOIN uom_units uom ON ta.uom_id = uom.id , shops, transactions t LEFT JOIN transaction_causals tcau on tcau.id=t.TRANSACTION_CAUSAL_ID LEFT JOIN customers c ON c.card_num = t.card_num, articles a LEFT JOIN groups g on g.id=a.group_a_id
    WHERE t.delete_operator_id IS NULL
    AND ta.causal_operator_id IS NULL
    AND COALESCE(tcau.in_statistics,1) = 1
    AND t.bookkeeping_date BETWEEN TO_DATE('2011-07-12','yyyy-mm-dd')
    AND TO_DATE('2011-07-13','yyyy-mm-dd')AND shops.id=t.shop_id 
    AND shops.id IN (1,3)  
    AND ( SHOPS.ID IN (1,3))
    AND ta.transaction_id=t.id 
    AND ta.delete_operator_id IS NULL
    AND a.id=ta.article_id
    AND (DATE_MINUTES(t.trans_date) >=0
    AND DATE_MINUTES(t.trans_date) <=1439)
    GROUP BY g.code, g.description, a.code, a.description,a.notes1,a.notes2,a.notes3, ta.UOM_id, uom.display_description
    ORDER BY g.code, a.code
    *****************
    
    04:00:04.390 Retrieving report data for table 'uom_units', sql is:
    *****************
    SELECT *
    FROM uom_units
    ORDER BY uom_group_id, is_default DESC
    *****************
    
    04:00:04.406 Warning: No Unit Of Measure is set as default for current UOM group (UOM group id = 1):
    adopting first UOM belonging to group (UOM id = 1) as group default unit.
    04:00:05.546 Sending report by email to gianpietro.nicoletti@gtngroup.it using SMTP server smtp.ts.nauta.it. Attached file: ArticleAnalisys-13072011-040004.pdf
    08:24:43.625 Admin started, version: 4.3.49.0
    08:24:43.656 StarterFileName is C:\TCPOS\Admin\TCPOS.AppStarter.exe
    08:24:43.843 RefreshServerVersion
    08:24:45.203 SelectObject<TCPOS.FrontEnd.DataClasses.DbSystemParameters> Query='SELECT * FROM system_parameters'
    08:24:45.390 Loaded schedulable report , version 1.0.4169.15647. Full type name: Plugin.Chipcard.Admin.BalanceTransferParametersForm
    08:24:45.500 Loaded schedulable report , version 1.0.4169.15647. Full type name: Plugin.Chipcard.Admin.BlacklistInsertParametersForm
    08:24:45.500 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Chipcard.Admin.dll, version 1.0.4169.15647. Added event catcher Plugin.Chipcard.Admin.ChipcardKeyConfig
    08:24:45.500 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Chipcard.Admin.dll, version 1.0.4169.15647. Added form Plugin.Chipcard.Admin.BalanceTransferParametersForm
    08:24:45.500 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Chipcard.Admin.dll, version 1.0.4169.15647. Added form Plugin.Chipcard.Admin.BlacklistForm
    08:24:45.765 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Chipcard.Admin.dll, version 1.0.4169.15647. Added form Plugin.Chipcard.Admin.BlacklistInsertParametersForm
    08:24:45.765 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Chipcard.Admin.dll, version 1.0.4169.15647. Added form Plugin.Chipcard.Admin.ChipcardBalanceTransferForm
    08:24:45.781 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Chipcard.Admin.dll, version 1.0.4169.15647. Added form Plugin.Chipcard.Admin.ChipcardBlacklistInsertForm
    08:24:45.781 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Chipcard.Admin.dll, version 1.0.4169.15647. Added form Plugin.Chipcard.Admin.ChipcardInvalidBalanceSearchForm
    08:24:45.781 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Chipcard.Admin.dll, version 1.0.4169.15647. Added form Plugin.Chipcard.Admin.CircuitChipcardForm
    08:24:45.781 Plugin dictionary C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Rana.KitchenMonitor.Admin.dic loaded
    08:24:45.781 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Rana.KitchenMonitor.Admin.dll, version 2.0.4153.18548. Added form Plugin.Rana.KitchenMonitor.Admin.KitchMonConfigForm
    08:24:45.781 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.Rana.KitchenMonitor.Admin.dll, version 2.0.4153.18548. Added form Plugin.Rana.KitchenMonitor.Admin.ArticlesForm
    08:24:45.781 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Plugins\Plugin.SecondDisplayEnhanced.Admin.dll, version 1.0.4206.24254. Added form Plugin.SecondDisplayEnhanced.Admin.SecondDisplayForm
    08:24:45.984 Loaded schedulable report ArticleAnalisys, version 1.0.4206.24191. Full type name: Report.ArticleAnalisys.ArticleAnalisysForm
    08:24:45.984 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.ArticleAnalisys.dll, version 1.0.4206.24191. Added form Report.ArticleAnalisys.ArticleAnalisysForm
    08:24:46.093 Loaded schedulable report Report Article Causals, version 1.1.4206.24190. Full type name: Report.ArticleCausals.ArticleCausalsReportForm
    08:24:46.093 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.ArticleCausals.dll, version 1.1.4206.24190. Added form Report.ArticleCausals.ArticleCausalsReportForm
    08:24:46.171 Loaded schedulable report Best / Worst Article, version 1.0.4206.24190. Full type name: Report.BestWorstArticle.BestWorstArticle
    08:24:46.171 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.BestWorstArticle.dll, version 1.0.4206.24190. Added form Report.BestWorstArticle.BestWorstArticle
    08:24:46.265 Loaded schedulable report CustomerStatement, version 1.0.4206.24190. Full type name: Report.CustomerStatement.CustomerStatementForm
    08:24:46.265 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.CustomerStatement.dll, version 1.0.4206.24190. Added form Report.CustomerStatement.CustomerStatementForm
    08:24:46.312 Loaded schedulable report DeletedTransactions, version 1.0.4206.24189. Full type name: Report.DeletedTransactions.DeletedTransactionsForm
    08:24:46.312 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.DeletedTransactions.dll, version 1.0.4206.24189. Added form Report.DeletedTransactions.DeletedTransactionsForm
    08:24:46.343 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.DrawerCount.dll, version 1.2.4206.24191. Added form Report.DrawerCount.DrawerCountsParametersForm
    08:24:46.406 Loaded schedulable report FinancialOverview1, version 1.5.4206.24191. Full type name: Report.FinancialOverview1.FinancialOverview1Form
    08:24:46.406 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.FinancialOverview1.dll, version 1.5.4206.24191. Added form Report.FinancialOverview1.FinancialOverview1Form
    08:24:46.500 Loaded schedulable report Report Menu Analysis, version 1.1.4206.24188. Full type name: Report.Menu.MenuAnalysisForm
    08:24:46.500 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.MenuReport.dll, version 1.1.4206.24188. Added form Report.Menu.MenuAnalysisForm
    08:24:46.593 Loaded schedulable report MoneyOnTheFly, version 1.1.4206.24187. Full type name: Report.MoneyOnTheFly.MoneyOnTheFlyForm
    08:24:46.593 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.MoneyOnTheFly.dll, version 1.1.4206.24187. Added form Report.MoneyOnTheFly.MoneyOnTheFlyForm
    08:24:46.640 Loaded schedulable report Operator control, version 1.0.4206.24187. Full type name: Report.OperatorControl.OperatorControl
    08:24:46.640 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.OperatorControl.dll, version 1.0.4206.24187. Added form Report.OperatorControl.OperatorControl
    08:24:46.656 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.ProfilePermissions.dll, version 1.0.4206.24184. Added form Report.ProfilePermissions.ProfilePermissionParameterForm
    08:24:46.750 Loaded schedulable report Report Promotions Analisys, version 1.0.4206.24188. Full type name: Report.PromotionsAnalisys.PromotionAnalisysForm
    08:24:46.750 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.PromotionsAnalisys.dll, version 1.0.4206.24188. Added form Report.PromotionsAnalisys.PromotionAnalisysForm
    08:24:46.812 Loaded schedulable report TablesReport, version 1.0.4206.24191. Full type name: Report.Tables.TablesReportForm
    08:24:46.812 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.Tables.dll, version 1.0.4206.24191. Added form Report.Tables.TablesReportForm
    08:24:46.921 Loaded schedulable report Report Transaction List, version 1.0.4206.24189. Full type name: Report.TransactionList.Report
    08:24:46.921 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.TransactionList.dll, version 1.0.4206.24189. Added form Report.TransactionList.Report
    08:24:46.968 Loaded schedulable report WithdrawalTransactions, version 1.0.4206.24188. Full type name: Report.WithdrawalTrans.WithdrawalForm
    08:24:46.968 Loaded plugin C:\TCPOS\Admin\Executables\4.3.49.0\Reports\Report.WithdrawalTrans.dll, version 1.0.4206.24188. Added form Report.WithdrawalTrans.WithdrawalForm
    08:24:47.437 TCP listener started.
    08:24:47.468 Host name: touch-gtn
    08:24:47.484 UDP listener started at 192.168.0.178:8889
    08:24:47.484 UDP listener started at 10.1.1.2:8889
    08:24:47.484 UDP listener started at 192.168.0.172:8889
    08:24:47.484 UDP listener started at 192.168.0.173:8889
    08:24:47.484 UDP listener started at 192.168.0.174:8889
    08:24:47.484 UDP listener started at 192.168.183.101:8889
    08:24:47.953 Local database downloaded. Compressed size=24372
    08:24:47.953 Broadcasting: QueryNodes
    
    
    08:24:47.984 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    continua...

  4. #14
    la continuazione:

    codice:
    08:24:47.984 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:24:47.984 Message queue for 192.168.0.185 started.
    08:24:52.687 Operator 1701 GTN - TCPOS logged in.
    08:24:52.734 Admin server version: 4.3.49.0
    08:24:59.781 Exception while getting available version
    on file http://TOUCH-GTN:5050/Updates/Version3.config:
    Impossibile effettuare la connessione al server remoto.
    08:24:59.843 Form TCPOS.Admin.SystemParametersForm has been activated.
    08:25:02.203 Form TCPOS.Admin.PrintoutTemplatesForm has been activated.
    08:25:05.796 Error while checking for update: Impossibile effettuare la connessione al server remoto.
    08:25:05.796 Updater: Check modified files
    08:25:23.109 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:25:23.109 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:26:04.453 SelectObject<TCPOS.FrontEnd.DataClasses.DbSystemParameters> Query='SELECT * FROM system_parameters'
    08:26:04.875 Form TCPOS.Admin.TillsForm has been activated.
    08:26:20.921 MessageBox: Errore - Codice cassa 1 già presente nel negozio, operazione impedita
    08:26:22.453 MessageBox result: button OK
    08:27:23.109 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:27:23.109 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:27:38.343 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:27:38.343 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:27:49.453 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:27:49.453 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:29:23.109 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    08:29:23.109 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:29:53.109 Form TCPOS.Admin.SystemParametersForm has been activated.
    08:29:55.625 Form TCPOS.Admin.PrintoutTemplatesForm has been activated.
    08:30:11.781 Exception while getting available version
    on file http://TOUCH-GTN:5050/Updates/Version3.config:
    Impossibile effettuare la connessione al server remoto.
    08:30:17.906 Error while checking for update: Impossibile effettuare la connessione al server remoto.
    08:30:17.906 Updater: Check modified files
    08:31:23.109 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:31:23.109 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:33:23.109 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:33:23.109 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:35:11.921 Exception while getting available version
    on file http://TOUCH-GTN:5050/Updates/Version3.config:
    Impossibile effettuare la connessione al server remoto.
    08:35:17.859 Error while checking for update: Impossibile effettuare la connessione al server remoto.
    08:35:17.859 Updater: Check modified files
    08:35:23.109 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:35:23.109 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:37:23.109 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:37:23.109 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:39:23.234 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:39:23.234 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:40:11.765 Exception while getting available version
    on file http://TOUCH-GTN:5050/Updates/Version3.config:
    Impossibile effettuare la connessione al server remoto.
    08:40:17.796 Error while checking for update: Impossibile effettuare la connessione al server remoto.
    08:40:17.812 Updater: Check modified files
    08:41:23.234 Broadcast received from 192.168.0.185 (Shop: 1 Till: 3)
    TCPOS,RegisterNode
    <node-info>
     <till-id>4</till-id>
     <till-code>3</till-code>
     <till-description>Cassa 2</till-description>
     <shop-id>1</shop-id>
     <shop-code>1</shop-code>
     <shop-description>Ristorante 1</shop-description>
    </node-info>
    
    08:41:23.234 Registration message received from IP 192.168.0.185 (Shop: 1 Till: 3)
    08:43:09.390 Admin terminated
    08:43:09.390 Message Queue for 192.168.0.185 stopped.
    08:43:09.390 TCP listener stopped.

  5. #15
    meglio che mi fai un copy of . cosi sappiamo che dati hai a disposizione...
    lancia un attimo



    <LTAB><xsl:value-of select="pos:translate('********* Articles and groups **********')"/></LTAB>


    <xsl:value-of select="pos:translate('Cod.')"/>
    <RTAB col="16"><xsl:value-of select="pos:translate('Description')"/></RTAB>
    <RTAB col="25"><xsl:value-of select="pos:translate('Weight')"/></RTAB>
    <RTAB col="30"><xsl:value-of select="pos:translate('Qty')"/></RTAB>
    <RTAB col="40"><xsl:value-of select="pos:translate('Amount')"/></RTAB>

    <xsl:for-each select="articles/group">

    <xsl:for-each select="article">
    <prova><xsl:copy-of select="."/></prova>
    </xsl:for-each>



    <xsl:value-of select="substring(concat(code,' ',description),1,20)"/>
    <RTAB col="30"><xsl:value-of select="pos:numFormat(sum(.//qty),'###,##0.##')"/></RTAB>
    <RTAB col="40"><xsl:value-of select="pos:numFormat(sum(.//amount))"/></RTAB>




    </xsl:for-each>


    e incollami il risultato

  6. #16
    In allegato l'immagine con il risultato.
    Forse non avevo specificato che non uso un browser per stampare il risultato ma un applicativo proprietario, perciò non ho potuto far fare una stampa più chiara (non si riesce ad allargare per far stare tutto risultato).
    Ho cercato invece di "pulire" il file Trace per renderlo un XML valido e presentarlo su un Browser con l'XSLT (con la modifica che mi hai proposto) ma non riesco a raggiungere il risultato (probabilmente l'applicativo proprietario aggiunge qualche intestazione runtime).
    In effetti, nell'XML Trace di origine, non c'è nessun tag <articles/group>.
    Immagini allegate Immagini allegate

  7. #17
    prova



    <LTAB>
    <xsl:value-of select="pos:translate('********* Articles and groups **********')"/>
    </LTAB>


    <xsl:value-of select="pos:translate('Cod.')"/>
    <RTAB col="16">
    <xsl:value-of select="pos:translate('Description')"/>
    </RTAB>
    <RTAB col="25">
    <xsl:value-of select="pos:translate('Weight')"/>
    </RTAB>
    <RTAB col="30">
    <xsl:value-of select="pos:translate('Qty')"/>
    </RTAB>
    <RTAB col="40">
    <xsl:value-of select="pos:translate('Amount')"/>
    </RTAB>


    <xsl:for-each select="articles/group">

    <xsl:for-each select="article">
    <xsl:variable name="temp_code" select="code"/>
    <xsl:variable name="temp_sum" select="pos:numFormat(sum(../article[code = $temp_code]/amount))"/>
    <xsl:if test="not(following-sibling::*[code = $temp_code])">
    <xsl:value-of select="substring(concat(code,' ',description),1,20)"/>
    <xsl:if test="measure_unit='weight'">
    <RTAB col="25">
    <xsl:value-of select="pos:numFormat(qty_weight,'###,##0.000')"/>
    </RTAB>
    </xsl:if>
    <RTAB col="30">
    <xsl:value-of select="pos:numFormat(qty,'###,##0.##')"/>
    </RTAB>
    <RTAB col="40">
    <xsl:value-of select="$temp_sum"/>
    </RTAB>


    </xsl:if>
    </xsl:for-each>



    <xsl:value-of select="substring(concat(code,' ',description),1,20)"/>
    <RTAB col="30">
    <xsl:value-of select="pos:numFormat(sum(.//qty),'###,##0.##')"/>
    </RTAB>
    <RTAB col="40">
    <xsl:value-of select="pos:numFormat(sum(.//amount))"/>
    </RTAB>





    </xsl:for-each>


    se funziona minimo una birra

  8. #18
    Grande. Funziona. La birra (in allegato) te la meriti subito; se passi dalle parti di Gorizia/Udine te ne offro una vera al malto e luppolo

    Ho fatto una piccola modifica aggiungendo una variabile che accumula anche la quantità oltre che al prezzo (altrimenti stampava un risultato errato).
    Non ci sarei mai arrivato ad usare delle variabili d'appoggio per stampare il prezzo totale e le quantità.
    Ancora non ho capito la funzionalità del comando
    codice:
    <xsl:for-each select="articles/group">
    visto che un "articles/group" nell'XML non c'è.
    Comunque quello che deve fare lo fa. Grazie mille.
    (in allegato la tua soluzione con la mia modifica sulle quantità)

    codice:
    
    <LTAB>
    <xsl:value-of select="pos:translate('********* Articles and groups **********')"/>
    </LTAB>
    
    
    <xsl:value-of select="pos:translate('Cod.')"/>
    <RTAB col="16">
    <xsl:value-of select="pos:translate('Description')"/>
    </RTAB>
    <RTAB col="25">
    <xsl:value-of select="pos:translate('Weight')"/>
    </RTAB>
    <RTAB col="30">
    <xsl:value-of select="pos:translate('Qty')"/>
    </RTAB>
    <RTAB col="40">
    <xsl:value-of select="pos:translate('Amount')"/>
    </RTAB>
    
    
    <xsl:for-each select="articles/group">
    
    <xsl:for-each select="article">
    <xsl:variable name="temp_code" select="code"/>
    <xsl:variable name="temp_qty" select="pos:numFormat(sum(../article[code = $temp_code]/qty),'###,##0.##')"/>
    <xsl:variable name="temp_sum" select="pos:numFormat(sum(../article[code = $temp_code]/amount))"/>
    <xsl:if test="not(following-sibling::*[code = $temp_code])">
    <xsl:value-of select="substring(concat(code,' ',description),1,20)"/>
    <xsl:if test="measure_unit='weight'">
    <RTAB col="25">
    <xsl:value-of select="pos:numFormat(qty_weight,'###,##0.000')"/>
    </RTAB>
    </xsl:if>
    <RTAB col="30">
    <xsl:value-of select="$temp_qty"/>
    </RTAB>
    <RTAB col="40">
    <xsl:value-of select="$temp_sum"/>
    </RTAB>
    
    
    </xsl:if>
    </xsl:for-each>
    
    
        
        
        <xsl:value-of select="substring(concat(code,' ',description),1,20)"/>
        <RTAB col="30"><xsl:value-of select="pos:numFormat(sum(.//qty),'###,##0.##')"/></RTAB>
        <RTAB col="40"><xsl:value-of select="pos:numFormat(sum(.//amount))"/></RTAB>
        
        
    
    
    </xsl:for-each>

    Ciao
    Immagini allegate Immagini allegate

  9. #19
    era questione di tempo e ce l'avremmo fatta e avere i dati giusti !!

    probabilmente quell articles/group viene creato da qualche parte nell' xsl !

    mandami un messaggio col nome del bar che tra un po' dovrei andare alla grotta gigante la in zona !!

    o aggiungimi su gmail !

    theus84@gmail.com

    felice di esserti stato utile

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.