<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="7.6cm" ColumnWidth="7.6cm" 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,0,0,0">
        <xrd:SectionDataGroup DataGroupName="ItemList">
            <Table Name="BillHeader" CellSpacing="0" Margin="0">
                <Table.Columns>
                    <TableColumn Width="*" />
                    <TableColumn Width="*" />
                </Table.Columns>
                <TableRowGroup>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="15" FontWeight="Bold" FontFamily="Cambria">
                                <xrd:InlineDocumentValue PropertyName="FirmName" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="11" FontWeight="Bold" FontFamily="Cambria">
                                <xrd:InlineDocumentValue PropertyName="DoorNo" /> ,
                                <xrd:InlineDocumentValue PropertyName="Street" /> ,
                                <!--<xrd:InlineDocumentValue PropertyName="City" /> ,
                                <xrd:InlineDocumentValue PropertyName="District" /> ,
                                <xrd:InlineDocumentValue PropertyName="State" /> ,-->
                                <xrd:InlineDocumentValue PropertyName="PinCode" /> ,
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="11" FontWeight="Bold" LineHeight="1" FontFamily="Cambria">Mob:
                                <xrd:InlineDocumentValue PropertyName="Phone1" /> 
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="11" FontWeight="Bold" FontFamily="Cambria">
                                <xrd:InlineDocumentValue PropertyName="Email" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="11" FontWeight="Bold" FontFamily="Cambria">SALES RETURN
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                </TableRowGroup>
            </Table>
            <Table Name="BillCustomerDet" Margin="0,10,0,0" CellSpacing="0" BorderBrush="Black" BorderThickness="0,0,0,0">
                <Table.Columns>
                    <TableColumn Width="140" />
                    <TableColumn Width="145" />
                </Table.Columns>
                <TableRowGroup>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontFamily="Cambria" Margin="5,0,0,0">Inv No.:
                               <xrd:InlineDocumentValue PropertyName="MSeries" />
                                <xrd:InlineDocumentValue PropertyName="MVno" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Right" FontSize="10" FontFamily="Cambria">Inv Date :
                                <xrd:InlineDocumentValue PropertyName="MBillDate" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                </TableRowGroup>             
            </Table>
             <Table Name="BillCustomerDet1" Margin="0,0,0,0" CellSpacing="0" BorderBrush="Black" BorderThickness="0,0,0,1">
                <Table.Columns>
                    <TableColumn Width="285" />
                </Table.Columns>
                <TableRowGroup>
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Left" FontSize="10" FontFamily="Cambria" Margin="5,0,0,0">Party :
                                <xrd:InlineDocumentValue PropertyName="MCustname" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                </TableRowGroup>                
            </Table>
            <Table Name="ItemDet" CellSpacing="0" BorderBrush="Black" BorderThickness="0,0,0,0">
                <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="Cambria"/>
                        <!--<Setter Property="Background" Value="LightGray" FontFamily="Cambria"/>-->
                    </Style>
                    <!-- Style for data rows. -->
                    <Style x:Key="dataRowStyle" TargetType="{x:Type TableRowGroup}">
                        <Setter Property="FontWeight" Value="SemiBold"/>
                        <Setter Property="FontFamily" Value="Cambria"/>
                        <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="35.0" />
                    <TableColumn Width="100.0" />
                    <TableColumn Width="50.0" />
                    <TableColumn Width="55.0" />                    
                    <TableColumn Width="55.0" />
                    <TableColumn Width="0.0" />
                     <TableColumn Width="0.0" />
                </Table.Columns>
                <TableRowGroup Style="{StaticResource headerFooterRowStyle}">
                    <TableRow>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>Sl.No</Bold>
                            </Paragraph>                            
                        </TableCell>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>Description</Bold>
                            </Paragraph>                            
                        </TableCell>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>QTY</Bold>
                            </Paragraph>                            
                        </TableCell>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>KRP</Bold>
                            </Paragraph>                            
                        </TableCell>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,1">
                            <Paragraph TextAlignment="Center">
                                <Bold>AMT</Bold>
                            </Paragraph>                            
                        </TableCell>
                    </TableRow>
                </TableRowGroup>
                <TableRowGroup Style="{StaticResource dataRowStyle}">
                    <xrd:TableRowForDataTable TableName="BillItemDet">
                         <TableCell>
                            <Paragraph TextAlignment="Center">
                                <xrd:InlineTableCellValue PropertyName="SlNo" />
                            </Paragraph>                         
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Left">
                                <xrd:InlineTableCellValue PropertyName="ItemName" />
                            </Paragraph>                         
                        </TableCell>
                        <TableCell>
                          <Paragraph  TextAlignment="Center">
                              <xrd:InlineTableCellValue PropertyName="Qty" />
                          </Paragraph>
                       </TableCell>
                       <TableCell>
                         <Paragraph TextAlignment="Center">
                            <xrd:InlineTableCellValue PropertyName="InputRate" />
                         </Paragraph>
                      </TableCell>  
                      <TableCell>
                         <Paragraph TextAlignment="Center">
                           <xrd:InlineTableCellValue PropertyName="LineTotal" />
                         </Paragraph>
                      </TableCell> 
                      <TableCell>
                           <Paragraph TextAlignment="Center">
                              <TextBlock Visibility="Collapsed">
                                 <xrd:InlineTableCellValue  PropertyName="SavingsVal" AggregateGroup="SavedAmt" />
                               </TextBlock>
                           </Paragraph>
                           <Paragraph TextAlignment="Center">
                              <TextBlock Visibility="Collapsed">
                                 <xrd:InlineTableCellValue PropertyName="DiscountAmount"  AggregateGroup="Discount"/>
                               </TextBlock>
                           </Paragraph>
                        </TableCell>
                    </xrd:TableRowForDataTable>
                </TableRowGroup>
                </Table>
                  <Table Name="user" Margin="0" CellSpacing="0" BorderBrush="Black" BorderThickness="0,0,0,0">
                <Table.Columns>
                    <TableColumn Width="280" />
                </Table.Columns>
                <TableRowGroup>
                    <TableRow>
                        
                        <TableCell>
                            <Paragraph TextAlignment="Right" FontSize="11" FontFamily="Cambria">
                                ***********************************************************
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                     </TableRowGroup>
            </Table>
            <Table Name="ItemTotals" Margin="0,0,10,0" CellSpacing="0" BorderBrush="Black" BorderThickness="0,0,0,0">
                <Table.Columns>
                    <TableColumn Width="180" />
                    <TableColumn Width="103" />
                </Table.Columns>
                <TableRowGroup>
                                         
                    <TableRow>
                        <TableCell FontWeight="BOLD">
                            <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria" Margin="5,0,0,0">Grand Total  
                            </Paragraph>
                        </TableCell>
                        <TableCell FontWeight="BOLD">
                            <Paragraph TextAlignment="Right" FontSize="12" FontFamily="Cambria" Margin="0,0,0,0">
                             <xrd:InlineDocumentValue  FontSize="12" PropertyName="MNetTotal" />
                              
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell FontWeight="BOLD">
                            <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria" Margin="5,0,0,0">Discount                                 
                            </Paragraph>
                        </TableCell>
                         <TableCell FontWeight="BOLD">
                            <Paragraph TextAlignment="Right" FontSize="12" FontFamily="Cambria" Margin="0,0,0,0">
                                <xrd:InlineDocumentValue  FontSize="12" PropertyName="DISCAFTTAXRECIVED" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                    <TableRow>
                        <TableCell FontWeight="BOLD">
                            <Paragraph TextAlignment="Left" FontSize="16" FontFamily="Cambria" Margin="5,10,0,0">Net Total                                 
                            </Paragraph>
                        </TableCell>
                         <TableCell FontWeight="BOLD">
                            <Paragraph TextAlignment="Right" FontSize="12" FontFamily="Cambria" Margin="0,10,0,0">
                                 <xrd:InlineDocumentValue  FontSize="16" PropertyName="MGrandTotal" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
                                                        
                </TableRowGroup>
            </Table>
            <!--  <Table Name="saved" Margin="0" Padding="0,0,0,0" CellSpacing="0" >
                <Table.Columns>
                    <TableColumn Width="285" />
                </Table.Columns>
                <TableRowGroup>                   
                   <TableRow>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,0">
                            <Paragraph TextAlignment="Center" FontSize="11" FontFamily="Cambria" Margin="5,10,0,0"> You Saved 
                              <xrd:InlineAggregateValue AggregateGroup="SavedAmt" AggregateValueType="Sum" EmptyValue="0"/>
                            </Paragraph>
                        </TableCell>
                    </TableRow>  
                    <TableRow>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,0">
                            <Paragraph TextAlignment="Right" FontSize="12" FontFamily="Cambria" Margin="0,0,0,0" FontWeight="Bold">
                            ****************************************************
                            </Paragraph>
                        </TableCell>
                    </TableRow>   
                </TableRowGroup>                
            </Table>--> 
           <!-- <Table Name="BillSignatory" Margin="0" Padding="0,0,0,0" CellSpacing="0" >
                <Table.Columns>
                    <TableColumn Width="285" />
                </Table.Columns>
                <TableRowGroup>                   
                    <TableRow>
                        <TableCell BorderBrush="Black" BorderThickness="0,0,0,0" FontWeight="SemiBold">
                            <Paragraph TextAlignment="Left" FontSize="11" FontFamily="Cambria" Margin="5,10,0,0">For Complaints &amp; Suggestion
                            </Paragraph>
                            <Paragraph TextAlignment="Left" FontSize="11" FontFamily="Cambria" Margin="5,10,0,0">Call +91-9895776555
                            </Paragraph>
                        </TableCell>
                    </TableRow>   
                </TableRowGroup>                
            </Table>-->
        </xrd:SectionDataGroup>
    </Section>
</FlowDocument>
