<pdf>
    <dynamic-page page-size="letter">
        <h1 text-align="center" margin-bottom="0">STOCK REQUISITION SLIP</h1>
        <h3 text-align="center" margin-top="0">{{ transferInventory.transferNo }}</h3>
        <table width="100%">
            <tr>
                <td width="50%" border.type="none">
                    <table width="100%">
                        <tr>
                            <td border.type="none" padding="1" width="40%">Date Requested:</td>
                            <td border.type="none" padding="1" font-style="bold">{{ transferInventory.transferDateAsString }}</td>
                        </tr>
                        <tr>
                            <td border.type="none" padding="1">Origin Branch:</td>
                            <td border.type="none" padding="1" font-style="bold">{{ transferInventory.branchFrom.description|default('') }}</td>
                        </tr>
                        <tr>
                            <td border.type="none" padding="1">Destination Branch:</td>
                            <td border.type="none" padding="1" font-style="bold">{{ transferInventory.branchTo.description|default('') }}</td>
                        </tr>
                        <tr>
                            <td border.type="none" padding="1">Status:</td>
                            <td border.type="none" padding="1" font-style="bold">{{ transferInventory.status }}</td>
                        </tr>
                    </table>
                </td>
                <td border.type="none">
                    <table width="100%">
                        <tr>
                            <td border.type="none" padding="1" width="30%">Requested By:</td>
                            <td border.type="none" padding="1" font-style="bold">{{ transferInventory.user.fullName|default('') }}</td>
                        </tr>
                        <tr>
                            <td border.type="none" padding="1">Notes:</td>
                            <td border.type="none" padding="1" font-style="bold">{{ transferInventory.note }}</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <br/>
        <br/>
        <br/>
        <table width="100%">
            <tr>
                <td padding="3" border.color="#AAAAAA" text-align="center" font-style="bold">Item</td>
                <td padding="3" border.color="#AAAAAA" width="75" text-align="right" font-style="bold">Quantity</td>
            </tr>
            {% for it in transferInventory.transferInventoryItems %}
            <tr>
                <td padding="3" border.color="#AAAAAA">{{ it.item.description }}</td>
                <td padding="3" border.color="#AAAAAA" text-align="right">{{ it.quantity|number_format(0, '.', ',') }}</td>
            </tr>
            {% endfor %}
        </table>
        <br/>
        <br/>
        <br/>
        <table width="100%">
            <tr font-style="italic">
                {#<td padding="5" border.type="none">Prepared By:</td>#}
                <td padding="5" border.type="none">Approved By:</td>
                <td width="15%" border.type="none"></td>
                <td padding="5" border.type="none">{#Checked By:#}</td>
                <td width="15%" border.type="none"></td>
                <td padding="5" border.type="none">{#Approved By:#}</td>
            </tr>
            <tr>
                <td border.type="none" padding="5">
                    <div style="height:75px;">
                        {% set isAppByRommel = transferInventory.isApprovedByStatusAndUserFullName(constant('STATUS_PENDING_APPROVAL', transferInventory), 'ROMMEL OCAMPO') %}
                        {% set isAppByAna = transferInventory.isApprovedByStatusAndUserFullName(constant('STATUS_PENDING_APPROVAL', transferInventory), 'ANA KHAIRA MACAM') %}
                        {% if isAppByRommel %}
                            <img ignore-error="true" src="{{ pdf_image('ZapconBundle:../approval/signatures/Rommel.png') }}" style="height:60px;margin-top:10px;" />
                        {% elseif isAppByAna %}
                            <img ignore-error="true" src="{{ pdf_image('ZapconBundle:../approval/signatures/Ana.png') }}" style="height:70px;margin-left:40px;" />
                        {% endif %}
                    </div>
                    <div>{{ isAppByAna ? 'ANA KHAIRA MACAM' : 'ROMMEL OCAMPO' }}</div>
                    <div border.type="top" margin-top="3" padding-top="3">Finance Officer</div>
                </td>
                <td border.type="none"></td>
                <td border.type="none" padding="5">
                </td>
                <td border.type="none"></td>
                <td border.type="none" padding="5">
                </td>
            </tr>
        </table>
    </dynamic-page>
</pdf>