<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="37" Padding="20,10,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">
                        </Paragraph>
                    </TableCell>
                 </TableRow>
		<TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center" FontSize="20" FontFamily="Cambria">
                        </Paragraph>
                    </TableCell>
                 </TableRow>
                <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" />,Fax:
                            <xrd:InlineDocumentValue PropertyName="Fax" />
                        </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">Tin:
                            <xrd:InlineDocumentValue PropertyName="Tin" /> , Cst:
                            <xrd:InlineDocumentValue PropertyName="Cst" /> , Flic:
                            <xrd:InlineDocumentValue PropertyName="FoodLic" /> , DrugLic:
                            <xrd:InlineDocumentValue PropertyName="DrugLic" /> 
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center" FontSize="12" FontFamily="Cambria">ExciseRegNo:
                            <xrd:InlineDocumentValue PropertyName="ExciseRegNo" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
		<TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center" FontSize="14" FontWeight="Bold" FontFamily="Cambria">PAYMENT VOUCHER
                                <xrd:InlineDocumentValue PropertyName="MFormType" />
                            </Paragraph>
                        </TableCell>
                    </TableRow>
            </TableRowGroup>
         </Table>
        <Table Name="BillCustomerDet" Margin="0" CellSpacing="0" BorderBrush="Black" BorderThickness="0.02cm">
            <Table.Columns>
                <TableColumn Width="65" />
                 <TableColumn Width="10" />
                  <TableColumn Width="490" />
                <TableColumn Width="100" />
                 <TableColumn Width="10" />
                  <TableColumn Width="75" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria"> Party 
                        </Paragraph>
                    </TableCell>
                     <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">:
                        </Paragraph>
                    </TableCell>
                      <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">
                          <xrd:InlineDocumentValue PropertyName="MCustname" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Payment Vch No.
                           
                        </Paragraph>
                    </TableCell>      
                     <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">:
                        </Paragraph>
                    </TableCell>
                     <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria"> 
                        <xrd:InlineDocumentValue PropertyName="MSeries" /> -
                            <xrd:InlineDocumentValue PropertyName="MVno" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
            <TableRowGroup>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Address :
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">:
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">
                         <xrd:InlineDocumentValue PropertyName="MAdd1" />,
                            <xrd:InlineDocumentValue PropertyName="MAdd2" />,
                             <xrd:InlineDocumentValue PropertyName="MAdd3" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Payment Vch Date 
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">:
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">
                         <xrd:InlineDocumentValue PropertyName="MBillDate" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
            <TableRowGroup>
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Ph 
                        </Paragraph>
                    </TableCell>
                     <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">:
                        </Paragraph>
                    </TableCell>
                     <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">
                          <xrd:InlineDocumentValue PropertyName="MMobile" />
                        </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>
                    <TableCell>
                        <Paragraph TextAlignment="Left" FontSize="12" FontFamily="Cambria">Cheque No.:
                            <xrd:InlineDocumentValue PropertyName="ChqNo" />
                        </Paragraph>
                    </TableCell>
                </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,0,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="140.0" />
                <TableColumn Width="140.0" />
                <TableColumn Width="140.0" />
                <TableColumn Width="140.0" />
                <TableColumn Width="191.0" />
            </Table.Columns>
            <TableRowGroup Style="{StaticResource headerFooterRowStyle}">
                <TableRow>
                    <TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Voucher No</Bold>
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Vch Date</Bold>
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Transaction</Bold>
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Pending Amount</Bold>
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Adjusted Amount</Bold>
                        </Paragraph>
                    </TableCell>
                   <!--<TableCell>
                        <Paragraph TextAlignment="Center">
                            <Bold>Balance Amount</Bold>
                        </Paragraph>
                    </TableCell>-->
                </TableRow>
            </TableRowGroup>
            <TableRowGroup Style="{StaticResource dataRowStyle}">
                <xrd:TableRowForDataTable TableName="RefDet">
                    <TableCell>
                        <Paragraph TextAlignment="Right">
                            <xrd:InlineTableCellValue PropertyName="VcbNo" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right">
                            <xrd:InlineTableCellValue PropertyName="AgnstTrnDate" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Left">
                            <xrd:InlineTableCellValue PropertyName="TrnName" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph  TextAlignment="Right">
                            <xrd:InlineTableCellValue PropertyName="PendingAmt" />
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right">
                            <xrd:InlineTableCellValue PropertyName="AdjAmt" />
                        </Paragraph>
                    </TableCell>
                    <!--<TableCell>
                        <Paragraph TextAlignment="Right">
                            <xrd:InlineTableCellValue PropertyName="BalAmt" />
                        </Paragraph>
                    </TableCell>-->
                </xrd:TableRowForDataTable>
            </TableRowGroup>
        </Table>
    </Section>
</FlowDocument>

