public function formPut(WorkOrder $workOrder, Inventory $inventory, InventoryStock $stock)
    {
        return $this->form->of('work-orders.parts.stocks.put', function (FormGrid $form) use ($workOrder, $inventory, $stock) {
            $form->attributes([
                'method' => 'POST',
                'url'    => route('maintenance.work-orders.parts.stocks.put', [$workOrder->getKey(), $inventory->getKey(), $stock->getKey()]),
            ]);

            $form->submit = 'Save';

            $form->fieldset(function (Fieldset $fieldset) use ($inventory, $stock) {
                $metric = $inventory->getMetricSymbol();

                $fieldset
                    ->control('input:text', 'quantity', function (Field $field) {
                        $field->label = 'Return Quantity';
                    })
                    ->value($stock->pivot->quantity)
                    ->attribute([
                        'placeholder' => "Enter Quantity in $metric",
                    ]);
            });
        });
    }
public function formPut(WorkOrder $workOrder, Inventory $inventory, InventoryStock $stock)
    {
        return $this->form->of('work-orders.parts.stocks.put', function (FormGrid $form) use ($workOrder, $inventory, $stock) {
            $form->attributes([
                'method' => 'POST',
                'url'    => route('maintenance.work-orders.parts.stocks.put', [$workOrder->getKey(), $inventory->getKey(), $stock->getKey()]),
            ]);

            $form->submit = 'Save';

            $form->fieldset(function (Fieldset $fieldset) use ($inventory, $stock) {
                $metric = $inventory->getMetricSymbol();

                $fieldset
                    ->control('input:text', 'quantity', function (Field $field) {
                        $field->label = 'Return Quantity';
                    })
                    ->value($stock->pivot->quantity)
                    ->attribute([
                        'placeholder' => "Enter Quantity in $metric",
                    ]);
            });
        });
    }
public function formPut ( WorkOrder $ workOrder , Inventory $ inventory , InventoryStock $ stock ) { return $ this -> form -> of ( 'work-orders.parts.stocks.put' , function ( FormGrid $ form ) use ( $ workOrder , $ inventory , $ stock ) { $ form -> attributes ( [ 'method' => 'POST' , 'url' => route ( 'maintenance.work-orders.parts.stocks.put' , [ $ workOrder -> getKey ( ) , $ inventory -> getKey ( ) , $ stock -> getKey ( ) ] ) , ] ) ; $ form -> submit = 'Save' ; $ form -> fieldset ( function ( Fieldset $ fieldset ) use ( $ inventory , $ stock ) { $ metric = $ inventory -> getMetricSymbol ( ) ; $ fieldset -> control ( 'input:text' , 'quantity' , function ( Field $ field ) { $ field -> label = 'Return Quantity' ; } ) -> value ( $ stock -> pivot -> quantity ) -> attribute ( [ 'placeholder' => "Enter Quantity in $metric" , ] ) ; } ) ; } ) ; }
Returns a new form for putting the stock from the
specified work order back into inventory.

@param WorkOrder      $workOrder
@param Inventory      $inventory
@param InventoryStock $stock

@return \Orchestra\Contracts\Html\Builder
Returns a new form for putting the stock from the specified work order back into inventory .