{% extends 'admin/layout.html.twig' %} {% block title %}Receive Stock - KitscoApp{% endblock %} {% block page_title %}Receive Stock{% endblock %} {% block content %}
Back to Inventory

Stock Receipt Details

Landed cost per unit is auto-calculated: (Purchase + Shipping + Customs + Other) / Quantity

{{ form_start(form) }}
{% set product_options = [] %} {% for choice in form.product.vars.choices %} {% set product_options = product_options|merge([{value: choice.value, label: choice.label}]) %} {% endfor %} {% include 'components/_select_dropdown.html.twig' with { id: form.product.vars.id, name: form.product.vars.full_name, value: form.product.vars.value, label: 'Product', options: product_options, placeholder: 'Select product...', searchable: true, searchPlaceholder: 'Search products...', required: true } %} {% do form.product.setRendered %}
{% set supplier_options = [] %} {% for choice in form.supplier.vars.choices %} {% set supplier_options = supplier_options|merge([{value: choice.value, label: choice.label}]) %} {% endfor %}
{% include 'components/_select_dropdown.html.twig' with { id: form.supplier.vars.id, name: form.supplier.vars.full_name, value: form.supplier.vars.value, label: false, options: supplier_options, placeholder: 'Select supplier (optional)...', searchable: true, searchPlaceholder: 'Search suppliers...', required: false } %}
{% do form.supplier.setRendered %}
{{ form_row(form.quantity) }}
{{ form_row(form.purchaseDate) }}

Cost Breakdown

Select currency for each cost. Exchange rate required for non-TZS currencies.

{# Build currency options excluding TZS #} {% set currency_options = [] %} {% for choice in form.purchaseCostCurrency.vars.choices %} {% if choice.label != 'TZS' %} {% set currency_options = currency_options|merge([{value: choice.value, label: choice.label}]) %} {% endif %} {% endfor %} {# Purchase Cost #}

Total for all purchased units

{% include 'components/_select_dropdown.html.twig' with { id: form.purchaseCostCurrency.vars.id, name: form.purchaseCostCurrency.vars.full_name, value: form.purchaseCostCurrency.vars.value, options: currency_options, placeholder: 'TZS', required: false, extra_attrs: {'@change': 'onCurrencyChange($event.target.value)'} } %} {% do form.purchaseCostCurrency.setRendered %}
{{ form_widget(form.purchaseCost, {attr: {class: 'w-full text-sm rounded-lg border-gray-300 focus:border-kitsco-accent focus:ring focus:ring-kitsco-accent/20', placeholder: 'Amount', '@input': 'calculate()'}}) }}
{{ form_widget(form.purchaseCostExchangeRate, {attr: {class: 'w-full text-sm rounded-lg border-gray-300 focus:border-kitsco-accent focus:ring focus:ring-kitsco-accent/20', placeholder: 'Rate to TZS', '@input': 'calculate()'}}) }}
=
{# Shipping Cost #}
{% include 'components/_select_dropdown.html.twig' with { id: form.shippingCostCurrency.vars.id, name: form.shippingCostCurrency.vars.full_name, value: form.shippingCostCurrency.vars.value, options: currency_options, placeholder: 'TZS', required: false, extra_attrs: {'@change': 'onCurrencyChange($event.target.value)'} } %} {% do form.shippingCostCurrency.setRendered %}
{{ form_widget(form.shippingCost, {attr: {class: 'w-full text-sm rounded-lg border-gray-300 focus:border-kitsco-accent focus:ring focus:ring-kitsco-accent/20', placeholder: 'Amount', '@input': 'calculate()'}}) }}
{{ form_widget(form.shippingCostExchangeRate, {attr: {class: 'w-full text-sm rounded-lg border-gray-300 focus:border-kitsco-accent focus:ring focus:ring-kitsco-accent/20', placeholder: 'Rate', '@input': 'calculate()'}}) }}
=
{# Customs Cost #}
{% include 'components/_select_dropdown.html.twig' with { id: form.customsCostCurrency.vars.id, name: form.customsCostCurrency.vars.full_name, value: form.customsCostCurrency.vars.value, options: currency_options, placeholder: 'TZS', required: false, extra_attrs: {'@change': 'onCurrencyChange($event.target.value)'} } %} {% do form.customsCostCurrency.setRendered %}
{{ form_widget(form.customsCost, {attr: {class: 'w-full text-sm rounded-lg border-gray-300 focus:border-kitsco-accent focus:ring focus:ring-kitsco-accent/20', placeholder: 'Amount', '@input': 'calculate()'}}) }}
{{ form_widget(form.customsCostExchangeRate, {attr: {class: 'w-full text-sm rounded-lg border-gray-300 focus:border-kitsco-accent focus:ring focus:ring-kitsco-accent/20', placeholder: 'Rate', '@input': 'calculate()'}}) }}
=
{# Other Costs - Collapsible with multiple items #}
{# Existing cost items #} {# Empty state #}

No other costs added

{# Add button #}
{# Hidden input to submit JSON data #}
{{ form_row(form.notes) }}
{# Documents Upload #}

Upload invoices, packing lists, customs docs, etc. (max 5 files, 5MB each)

{% do form.documentFiles.setRendered %} {# Hidden inputs for uploaded file IDs #}

Drag & drop files here or

{# File list #}
{# Rejected files - shown briefly with red indicator #} {# Uploading/uploaded files #}

Cancel
{{ form_end(form) }}
{# New Supplier Modal #} {% endblock %}