{runquery 1} {runquery 5}{runquery 6} {runquery 7}
{translatestatictext 'Revenue Summarization'.{const language}} {field 6.name2}
{dif {field 5.TotalPosRev.0}=0}
{translatestatictext 'No Revenue'.{const language}}
{/dif} {else}

- {translatestatictext 'Department Code'.{const language}}
  {translatestatictext 'Code'.{const language}}
  {translatestatictext 'Total'.{const language}}
{forall 1}
- {field 1.ZDCO_LONGDESC}
  {field 1.ZDCO_NUMERICDESC}
  {field 1.FormattedAmount} {field 7.currency}
{/forall}
- {translatestatictext 'Total'.{const language}}
  {field 5.TotalPosRev} {field 7.currency}

{translatestatictext 'Total Revenue by Reservation in EUR'.{const language}}
{runquery 3}{forall 3}
{translatestatictext 'Stay from:'.{const language}} {field 3.YRES_EXPARRTIME} - {field 3.YRES_EXPDEPTIME}, {translatestatictext 'Res.-No.'.{const language}} {field 3.ZPOS_ORIGINATED_YRES_ID}
{runsubquery 2.3.ZPOS_ORIGINATED_XCMS_ID}

- {translatestatictext 'Department Code'.{const language}}
  {translatestatictext 'Code'.{const language}}
  {translatestatictext 'Total'.{const language}}
{forall 2} {dif {field 2.ZPOS_ORIGINATED_YRES_ID}={field 3.ZPOS_ORIGINATED_YRES_ID}}
- {field 2.ZDCO_LONGDESC}
  {field 2.ZDCO_NUMERICDESC}
  {field 2.FormattedAmount} {field 7.currency}
{/dif}{/forall}
- {translatestatictext 'Total'.{const language}}
  {field 3.Totalamount} {field 7.currency}

{/forall} {/else}