@if(request()->boolean('pos_popup') && !empty($createdProduct ?? null))
Product created: {{ $createdProduct->name }}{{ $createdProduct->barcode ? ' ('.$createdProduct->barcode.')' : '' }}
@endif @unless(request()->boolean('pos_popup')) @include('pos.products.nav') @endunless
@csrf @if ($product->exists) @method('PUT') @endif @if(request()->boolean('pos_popup')) @endif
@php $selectedCat = old('product_category_id', $product->product_category_id); @endphp

{{ $errors->first('barcode') }}

@if($product->exists && $product->product_image) @endif
@php $isPricingVariant = (bool) old('pricing_is_variant', !empty($product->pricing_parent_id)); $pricingParentId = old('pricing_parent_id', $product->pricing_parent_id); $pricingParent = null; if (!empty($pricingParentId)) { try { $pricingParent = $allProducts->firstWhere('id', (int) $pricingParentId); } catch (\Exception $e) { $pricingParent = null; } } $pricingFields = [ 'cost', 'agency_rate', 'default_price', 'tax_rate', 'price_buy', 'price_sale', 'price_discount', 'price_discount_qty', 'price_discount_unit', 'price_wholesale', 'price_wholesale_qty', 'price_wholesale_unit', 'price_wholesale_qty1', 'price_wholesale_unit1', 'price_wholesale_qty2', 'price_wholesale_unit2', 'price_special', 'price_special_qty', 'price_special_unit', ]; $hasPricingOverride = false; if ($pricingParent) { foreach ($pricingFields as $f) { $a = (string) (old($f, $product->{$f}) ?? ''); $b = (string) ($pricingParent->{$f} ?? ''); if ($a !== $b) { $hasPricingOverride = true; break; } } } $storedOverride = $product->pricing_override_pricing ?? null; // Legacy behavior: if not explicitly set, default to "follow" (override OFF). $allowOverridePricing = (bool) old('pricing_allow_override_pricing', (bool) ($storedOverride ?? false)); @endphp
Variant Pricing
@if(!empty($product->id) && !empty($variantChildrenCount))
This product has {{ (int) $variantChildrenCount }} variant(s). Following pricing: {{ (int) ($variantChildrenFollowCount ?? 0) }}.
@endif
@if(!empty($product->id) && !empty($variantChildrenCount)) @endif

Use this when variants have separate stock (e.g., colors) but should share qty-ladder pricing in POS.


Price Details

Normal Sell Pricing
Wholesale Sell Pricing
Special Sell Pricing

Affect Another Product's Stock

If this product is a bundle/case/package that affects another product's stock, link it here.
Example: A case of 32 individual units, a box of 24 packets, etc.

Choose the base product (e.g., individual Coca Cola 250ml)

How many of the base product in this product (e.g., 32 individual units in a case)

Helpful note about this relationship

@php $showScaleCode = (bool) old('scale_item', $product->scale_item) || $errors->has('scale_code'); @endphp
@if($showScaleCode)
@else
Cancel
@if(!empty($product->id) && !empty($variantChildrenCount)) @endif