<FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:xrd="clr-namespace:CodeReason.Reports.Document;assembly=CodeReason.Reports" 
              PageHeight="29.7cm" PageWidth="8cm" ColumnWidth="8cm" PagePadding="0.00cm">
    <xrd:ReportProperties>
        <xrd:ReportProperties.ReportName>SimpleReport</xrd:ReportProperties.ReportName>
        <xrd:ReportProperties.ReportTitle>Simple Report</xrd:ReportProperties.ReportTitle>
    </xrd:ReportProperties>
    <Section Padding="0,0,0,0" FontSize="12" Margin="0">
        <xrd:SectionDataGroup DataGroupName="ItemList">
            <Table Name="BillHeader" CellSpacing="0" Margin="0" Padding="10,0,0,0">
                <Table.Columns>
                    <TableColumn Width="*" />
                </Table.Columns>
                <TableRowGroup>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="14" FontWeight="Bold" FontFamily="Arial" Margin="0,20,0,0">
                                <xrd:InlineDocumentValue PropertyName="FirmName" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Bold" FontFamily="Arial">
                                <xrd:InlineDocumentValue PropertyName="DoorNo" /> ,
                                <xrd:InlineDocumentValue PropertyName="Street" /> ,
                                <xrd:InlineDocumentValue PropertyName="City" /> ,
                                <xrd:InlineDocumentValue PropertyName="District" /> ,
                                <xrd:InlineDocumentValue PropertyName="State" /> ,
                                <xrd:InlineDocumentValue PropertyName="Country" /> ,Pin:
                                <xrd:InlineDocumentValue PropertyName="PinCode" /> ,
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Bold" LineHeight="1" FontFamily="Arial">Ph:
                                <xrd:InlineDocumentValue PropertyName="Phone1" /> ,
                                <xrd:InlineDocumentValue PropertyName="Phone2" /> ,
                                <xrd:InlineDocumentValue PropertyName="Phone3" /> ,Fax:
                                <xrd:InlineDocumentValue PropertyName="Fax" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Bold" FontFamily="Arial">Email:
                                <xrd:InlineDocumentValue PropertyName="Email" /> WebSite:
                                <xrd:InlineDocumentValue PropertyName="WebSite" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Bold" FontFamily="Arial">GSTIN:
                                <xrd:InlineDocumentValue PropertyName="GSTIN" /> , FSSAI No:
                                <xrd:InlineDocumentValue PropertyName="FoodLic" /> 
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Bold" FontFamily="Arial">GOODS AND SERVICES TAX INVOICE RULES
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Bold" FontFamily="Arial">FORM GST INV-1
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                </TableRowGroup>
            </Table>
            <Table Name="BillCustomerDet" Margin="0" Padding="20,0,0,0" CellSpacing="0" BorderBrush="Black" BorderThickness="0.00cm">
                <Table.Columns>
                    <TableColumn Width="130" />
                    <TableColumn Width="125" />
                </Table.Columns>
                <TableRowGroup>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Arial">Inv No.:
                                <xrd:InlineDocumentValue PropertyName="MSeries" /> -
                                <xrd:InlineDocumentValue PropertyName="MVno" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Arial">Inv Date :
                                <xrd:InlineDocumentValue PropertyName="MBillDate" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                </TableRowGroup>
                <TableRowGroup>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Arial">Customer Name :
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Arial">
                                <xrd:InlineDocumentValue PropertyName="DelLedgerName" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                </TableRowGroup>                
            </Table> 
            <Table Name="ItemDet" CellSpacing="0" Padding="20,0,0,0" BorderBrush="Black" BorderThickness="0.00cm">
                <Table.Resources>
                    <!-- Style for header/footer rows. -->
                    <Style x:Key="headerFooterRowStyle" TargetType="{x:Type TableRowGroup}">
                        <Setter Property="FontWeight" Value="Bold"/>
                        <Setter Property="FontSize" Value="10"/>
                        <Setter Property="FontFamily" Value="Arial"/>
                        <!--<Setter Property="Background" Value="LightGray" FontFamily="Arial"/>-->
                    </Style>
                    <!-- Style for data rows. -->
                    <Style x:Key="dataRowStyle" TargetType="{x:Type TableRowGroup}">
                        <Setter Property="FontWeight" Value="SemiBold"/>
                        <Setter Property="FontFamily" Value="Arial"/>
                        <Setter Property="FontSize" Value="10"/>
                    </Style>

                    <!-- Style for data cells. -->
                    <Style TargetType="{x:Type TableCell}">
                        <Setter Property="Padding" Value="0.1cm"/>
                        <Setter Property="BorderBrush" Value="Black"/>
                        <Setter Property="BorderThickness" Value="0.00cm"/>
                    </Style>
                </Table.Resources>
                <Table.Columns>
                    <!--<TableColumn Width="30.0" />-->
                    <TableColumn Width="90.0" />
                    <TableColumn Width="45.0" />
                    <TableColumn Width="40.0" />
                    <TableColumn Width="50.0" />
                    <TableColumn Width="50.0" />
                </Table.Columns>
                <TableRowGroup Style="{StaticResource headerFooterRowStyle}">
                    <TableRow>
                        <!--<TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>GST%</Bold>
                            </Paragraph>
                        </TableCell>-->
                        <TableCell BorderBrush="Black" BorderThickness="0,1,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>Item Description</Bold>
                            </Paragraph>
                        </TableCell>
                         <TableCell BorderBrush="Black" BorderThickness="0,1,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>MRP</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell BorderBrush="Black" BorderThickness="0,1,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>Rate</Bold>
                            </Paragraph>
                        </TableCell>
                         <TableCell BorderBrush="Black" BorderThickness="0,1,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>Qty</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell BorderBrush="Black" BorderThickness="0,1,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>Total</Bold>
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                </TableRowGroup>
                <TableRowGroup Style="{StaticResource dataRowStyle}">
                    <xrd:TableRowForDataTable TableName="BillItemDet">
                       <!-- <TableCell>
                            <Paragraph TextAlignment="Right">
                                <xrd:InlineTableCellValue PropertyName="TaxPer" />
                            </Paragraph>
                        </TableCell>-->
                        <TableCell>
                            <Paragraph TextAlignment="Left">
                                <xrd:InlineTableCellValue PropertyName="ItemName" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <xrd:InlineTableCellValue PropertyName="MRP" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph  TextAlignment="Center">
                                <xrd:InlineTableCellValue PropertyName="TaxInclRate" />
                                <!--<xrbc:TableCellBarcodeC128 PropertyName="EAN" Width="2cm" Height="0.5cm" BarcodeSubType="A" ShowText="False" />-->
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <xrd:InlineTableCellValue PropertyName="Qty" />
                            </Paragraph>
                        </TableCell>

                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <xrd:InlineTableCellValue PropertyName="LineTotal" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                        <Paragraph TextAlignment="Right">
                        <TextBlock x:Name="HideMe1" Visibility="Collapsed">
                        <xrd:InlineTableCellValue  PropertyName="SavingsVal" AggregateGroup="SavedAmt" />
                        </TextBlock>
                        </Paragraph>
                    </TableCell>
                    </xrd:TableRowForDataTable>
                </TableRowGroup>
            </Table>
            
            <Table Name="ItemTotals" Padding="20,0,0,0" CellSpacing="0">
                <Table.Columns>
                 <TableColumn Width="275" />  
                </Table.Columns>
                <TableRowGroup>
                <TableRow>
                        <TableCell BorderBrush="Black" BorderThickness="0,1,0,0">
                        <Paragraph TextAlignment="Right" FontSize="12" FontFamily="Draft 10cpi">ROUND OFF :
                            <xrd:InlineDocumentValue PropertyName="MRoundOFF" /> 
                        </Paragraph>
                    </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell FontWeight="BOLD">
                            <Paragraph TextAlignment="Right" FontSize="12" FontFamily="Arial">Grand Total  :
                                <xrd:InlineDocumentValue  FontSize="12" PropertyName="MNetTotal" />
                            </Paragraph>
                        </TableCell>    
                    </TableRow>
                    <TableRow>
                       <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontFamily="Arial">SODEXO S.Charge  :
                                <xrd:InlineDocumentValue  FontSize="10" PropertyName="SSERVICECHARGE35" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,1">
                            <Paragraph TextAlignment="Left" FontSize="10" FontFamily="Arial">T.Rest. S.Charge  :
                                <xrd:InlineDocumentValue  FontSize="10" PropertyName="TSERVICECHARGE45" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>  
                    <TableRow>
                        <TableCell FontWeight="Bold" FontSize="12">
                            <Paragraph TextAlignment="Right"  FontFamily="Arial">Saved Amount  :
                                <xrd:InlineAggregateValue AggregateGroup="SavedAmt" AggregateValueType="Sum" EmptyValue="0"/>
                            </Paragraph>
                        </TableCell>
                    </TableRow>      
                </TableRowGroup>
            </Table>
             <Table Name="BillDeclaration" Padding="20,0,0,0" CellSpacing="0">
                <Table.Columns>
                    <TableColumn Width="250" />
                </Table.Columns>
                <TableRowGroup>
                   
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial" FontStyle="Italic">(Tax Amount Included)
                            </Paragraph>
                        </TableCell>
                         
                    </TableRow>
                       
                </TableRowGroup>
            </Table>
            <Table Name="LedgerTotals" Padding="20,0,0,0" CellSpacing="0">
                <Table.Columns>
                    <TableColumn Width="130" />
                    <TableColumn Width="140" />
                </Table.Columns>
                <TableRowGroup>
                    <TableRow>
                        <TableCell BorderBrush="Black" BorderThickness="0,1,0,0">
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">SGST @ 2.5% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTSGSTONSALESGST5" />
                            </Paragraph>
                        </TableCell>
                        <TableCell BorderBrush="Black" BorderThickness="0,1,0,0">
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">CGST @ 2.5% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTCGSTONSALESGST5" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>                
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">SGST @ 6% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTSGSTONSALESGST12" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">CGST @ 6% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTCGSTONSALESGST12" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">SGST @ 9% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTSGSTONSALESGST18" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">CGST @ 9% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTCGSTONSALESGST18" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">SGST @ 14% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTSGSTONSALESGST28" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">CGST @ 14% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTCGSTONSALESGST28" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,1">
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">CESS @ 12% :
                                <xrd:InlineDocumentValue PropertyName="OUTPUTCESSONSALESCESS12" />
                            </Paragraph>
                        </TableCell>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,1">
                            <Paragraph TextAlignment="Left" FontSize="10" FontWeight="Bold" FontFamily="Arial">
                            </Paragraph>
                        </TableCell>
                    </TableRow>                
                </TableRowGroup>
            </Table>
            <Table Name="BillSignatory" Padding="20,0,0,0" CellSpacing="0">
                <Table.Columns>
                    <TableColumn Width="245" />
                </Table.Columns>
                <TableRowGroup>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontFamily="TimesNewRoman">On
                            <xrd:InlineDocumentValue PropertyName="PrintDate" Format="dd.MM.yyyy HH:mm:ss"/>
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="10"  FontWeight="Bold" FontFamily="Arial">Please Check Your Bill Before Leaving The Shop
                            </Paragraph>
                        </TableCell>
                        </TableRow>
                       <TableRow>
                        <TableCell>
                          <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Normal" FontFamily="Arial"> No Refund for food stuff sold
                          </Paragraph>
                        </TableCell>
                        </TableRow>
                        <TableRow>
                        <TableCell>
                          <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Normal" FontFamily="Arial"> Other item exchange within 3 days with original bill
                          </Paragraph>
                        </TableCell>
                        </TableRow>
                        <TableRow>
                        <TableCell>
                          <Paragraph TextAlignment="Center" FontSize="10" FontWeight="Normal" FontFamily="Arial"> Thank you for shopping us
                          </Paragraph>
                        </TableCell>
                        </TableRow>
                </TableRowGroup>
            </Table>
        </xrd:SectionDataGroup>
    </Section>
</FlowDocument>
