{$t('movements.new')}
{$t('movements.type')}
{#each ['in', 'out', 'adjust'] as opt}
(movementType = opt)}> {$t('movements.type_' + opt)}
{/each}
{$t('movements.part')} *
—
{#each visibleParts as p}
{localized(p, 'name', lang)} ({$t('parts.quantity_on_hand')}: {p.quantity_on_hand})
{/each}
{#if partSearch && filteredParts.length === 0}
{$t('parts.no_results')}
{/if} {#if errors.part_id}
{$t(errors.part_id)}
{/if}
{$t('movements.quantity')} *
{#if errors.quantity}
{$t(errors.quantity)}
{/if} {#if movementType === 'adjust' && selectedPart}
{$t('parts.quantity_on_hand')}: {selectedPart.quantity_on_hand}
{/if}
{#if movementType !== 'adjust'}
{$t('movements.unit_price')} ({$t('common.currency_short')})
{#if selectedPart && unitPrice === lastAutoUnitPrice && unitPrice !== ''}
{movementType === 'in' ? $t('parts.cost_price') : $t('parts.sale_price')}
{/if}
{/if} {#if movementType === 'in'}
{$t('movements.supplier')}
—
{#each suppliers as s}
{s.name}
{/each}
{/if}
{$t('movements.reference')}
{$t('movements.notes')}
{$t('common.save')}
{$t('common.cancel')}