<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"
              xmlns:xrbc="clr-namespace:CodeReason.Reports.Document.Barcode;assembly=CodeReason.Reports"
              PageHeight="14.8cm" PageWidth="21cm" ColumnWidth="21cm">
    <xrd:ReportProperties>
    </xrd:ReportProperties>
    <xrd:SectionReportHeader PageHeaderHeight="28" Padding="20,20,0,0" FontSize="12">
        <Table Name="BillHeader" CellSpacing="0">
            <Table.Columns>
                <TableColumn Width="*" />
                <TableColumn Width="*" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center" FontSize="20" FontFamily="Cambria">
                            <xrd:InlineDocumentValue PropertyName="FirmName" />
                        </Paragraph>
                    </TableCell>
                 </TableRow>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center" FontSize="12" 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="Country" />,Pin:
                            <xrd:InlineDocumentValue PropertyName="PinCode" /> ,
                        </Paragraph>
                    </TableCell>                   
                </TableRow>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center" FontSize="12" LineHeight="1" FontFamily="Cambria">Ph:
                            <xrd:InlineDocumentValue PropertyName="Phone1" />,
                            <xrd:InlineDocumentValue PropertyName="Phone2" />,
                            <xrd:InlineDocumentValue PropertyName="Phone3" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center" FontSize="12" FontFamily="Cambria">Email:
                            <xrd:InlineDocumentValue PropertyName="Email" /> WebSite:
                            <xrd:InlineDocumentValue PropertyName="WebSite" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center" FontSize="12" FontFamily="Cambria">GSTIN:
                            <xrd:InlineDocumentValue PropertyName="GSTIN" /> 
                        </Paragraph>
                    </TableCell>
                </TableRow>
                
		        <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="12" FontWeight="Bold" FontFamily="Cambria">JOURNAL VOUCHER
                            </Paragraph>
                        </TableCell>
                    </TableRow>
            </TableRowGroup>
         </Table>
        <Table Name="BillCustomerDet" Margin="0" CellSpacing="0" BorderBrush="Black" BorderThickness="0.02cm">
            <Table.Columns>
                <TableColumn Width="750" />
                <!--<TableColumn Width="375" />-->
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <!--<TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria"> Party :
                            <xrd:InlineDocumentValue PropertyName="MCustname" />
                        </Paragraph>
                    </TableCell>-->
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Vch No.:
                            <xrd:InlineDocumentValue PropertyName="MSeries" /> -
                            <xrd:InlineDocumentValue PropertyName="MVno" />
                        </Paragraph>
                    </TableCell>                    
                </TableRow>
            </TableRowGroup>
            <TableRowGroup>
                <TableRow>
                    <!--<TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Address :
                            <xrd:InlineDocumentValue PropertyName="MAdd1" />,
                            <xrd:InlineDocumentValue PropertyName="MAdd2" />
                        </Paragraph>
                    </TableCell>-->
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Vch Date :
                            <xrd:InlineDocumentValue PropertyName="MBillDate" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
           <!-- <TableRowGroup>
                <TableRow>
                   <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">
                            <xrd:InlineDocumentValue PropertyName="MAdd3" /> Ph :
                            <xrd:InlineDocumentValue PropertyName="MPhone" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>-->
        </Table>
    </xrd:SectionReportHeader>
    <xrd:SectionReportFooter PageFooterHeight="25" Padding="20,10,0,20" FontSize="12" FontFamily="Cambria">
        <Table Name="LedgerTotals"  Margin="0" Padding="0,0,0,0" CellSpacing="0" BorderBrush="Black" BorderThickness="0.02cm">
            <Table.Columns>
                <TableColumn Width="350" />
                <TableColumn Width="400" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="14" FontFamily="Cambria">Total:
                            <xrd:InlineDocumentValue PropertyName="AmountInWords" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right" FontSize="14" FontFamily="Cambria">
                            <xrd:InlineDocumentValue PropertyName="MGrandTotal" />
                        </Paragraph>
                    </TableCell>                    
                </TableRow>
            </TableRowGroup>
        </Table>
        <Table Name="BillDeclaration" Margin="0" Padding="0,0,0,0" CellSpacing="0">
            <Table.Columns>
                <TableColumn Width="700" />
                <TableColumn Width="*" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                </TableRow>                
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Narr:
                            <xrd:InlineDocumentValue PropertyName="Narration" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="10" FontFamily="Cambria">Declaration: 
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="10" FontFamily="Cambria">
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
        </Table>
        <Table Name="BillSignatory" Margin="0" Padding="0,10,0,0" CellSpacing="0">
            <Table.Columns>
                <TableColumn Width="375" />
                <TableColumn Width="375" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="14" FontFamily="Cambria">Party Signature
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right" FontSize="14" FontFamily="Cambria">For :
                            <xrd:InlineDocumentValue PropertyName="FirmName" />
                        </Paragraph>
                    </TableCell>                    
                </TableRow>
            </TableRowGroup>
        </Table>
    </xrd:SectionReportFooter>
    <Section Padding="0,0,0,0" FontSize="12" BreakPageBefore="True">
        <Table CellSpacing="0" BorderBrush="Black" BorderThickness="0.02cm">
            <Table.Resources>
                <!-- Style for header/footer rows. -->
                <Style x:Key="headerFooterRowStyle" TargetType="{x:Type TableRowGroup}">
                    <Setter Property="FontWeight" Value="DemiBold"/>
                    <Setter Property="FontSize" Value="12"/>
                    <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="FontFamily" Value="Cambria"/>
                    <Setter Property="FontSize" Value="12"/>
                </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.01cm"/>
                </Style>
            </Table.Resources>

            <Table.Columns>
                <TableColumn Width="550.0" />
                <TableColumn Width="100.0" />
                <TableColumn Width="100.0" />
            </Table.Columns>
            <TableRowGroup Style="{StaticResource headerFooterRowStyle}">
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Ledger Name</Bold>
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Debit Amount</Bold>
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Debit Amount</Bold>
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
            <TableRowGroup Style="{StaticResource dataRowStyle}">
                <xrd:TableRowForDataTable TableName="RefDet">
                    <TableCell>
                        <Paragraph TextAlignment="Left">
                            <xrd:InlineTableCellValue PropertyName="LedgerName" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right">
                            <xrd:InlineTableCellValue PropertyName="DebitAmount" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right">
                            <xrd:InlineTableCellValue PropertyName="CreditAmount" />
                        </Paragraph>
                    </TableCell>
                </xrd:TableRowForDataTable>
            </TableRowGroup>
        </Table>
    </Section>
</FlowDocument>

