@extends('header') @section('head') @parent @stop @section('content') @if ($invoice) @endif {{ Former::open($url)->method($method)->addClass('main_form')->rules(array( 'client' => 'required', 'email' => 'required', 'product_key' => 'max:20', )) }}
@if ($invoice)
@endif {{ Former::select('client')->addOption('', '')->data_bind("dropdown: client")->addGroupClass('client_select closer-row') }}
@if ($invoice)
@endif
{{ Former::text('invoice_date')->data_bind("datePicker: invoice_date, valueUpdate: 'afterkeydown'") ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }} {{ Former::text('due_date')->data_bind("datePicker: due_date, valueUpdate: 'afterkeydown'") ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }}
{{ Former::select('frequency_id')->options($frequencies)->data_bind("value: frequency_id") }} {{ Former::text('start_date')->data_bind("datePicker: start_date, valueUpdate: 'afterkeydown'") ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }} {{ Former::text('end_date')->data_bind("datePicker: end_date, valueUpdate: 'afterkeydown'") ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('') }}
@if ($invoice && $invoice->recurring_invoice_id)
Created by a {{ link_to('/invoices/'.$invoice->recurring_invoice_id, 'recurring invoice') }}
@else
{{ Former::checkbox('recurring')->text('Enable    Learn more')->data_bind("checked: is_recurring") ->inlineHelp($invoice && $invoice->last_sent_date ? 'Last invoice sent ' . Utils::dateToString($invoice->last_sent_date) : '') }}
@endif
{{ Former::text('invoice_number')->label(trans('fields.invoice_number_short'))->data_bind("value: invoice_number, valueUpdate: 'afterkeydown'") }} {{ Former::text('po_number')->label(trans('fields.po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") }} {{ Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'")->append('%') }} {{-- Former::select('currency_id')->addOption('', '')->fromQuery($currencies, 'name', 'id')->data_bind("value: currency_id") --}}

 

{{ Former::hidden('data')->data_bind("value: ko.mapping.toJSON(model)") }}
Item Description Unit Cost Quantity Tax Line Total
{{ Former::text('product_key')->useDatalist(Product::getProductKeys($products), 'product_key')->onkeyup('onItemChange()') ->raw()->data_bind("value: product_key, valueUpdate: 'afterkeydown'")->addClass('datalist') }}
 

{{ Former::textarea('public_notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'") ->label(false)->placeholder('Note to client')->style('width: 520px; resize: none') }} {{ Former::textarea('terms')->data_bind("value: wrapped_terms, valueUpdate: 'afterkeydown'") ->label(false)->placeholder('Invoice terms')->style('width: 520px; resize: none') ->addGroupClass('less-space-bottom') }}
Subtotal
Discount
Tax
Paid to Date
Balance Due

 

{{ Former::text('action') }} @if ($invoice) {{ Former::populateField('id', $invoice->public_id) }} {{ Former::text('id') }} @endif
{{ Former::select('invoice_design_id')->style('display:inline;width:120px')->raw() ->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") }} {{ Button::primary('Download PDF', array('onclick' => 'onDownloadClick()'))->append_with_icon('download-alt'); }} @if (!$invoice || (!$invoice->trashed() && !$invoice->client->trashed())) @if ($invoice) {{-- DropdownButton::normal('Download PDF', Navigation::links( array( array('Download PDF', "javascript:onDownloadClick()"), array(Navigation::DIVIDER), array('Create Payment', "javascript:onPaymentClick()"), array('Create Credit', "javascript:onCreditClick()"), ) ) , array('id'=>'relatedActions', 'style'=>'text-align:left'))->split(); --}} {{-- DropdownButton::primary('Save Invoice', Navigation::links( array( array('Save Invoice', "javascript:onSaveClick()"), array('Clone Invoice', "javascript:onCloneClick()"), array(Navigation::DIVIDER), array('Archive Invoice', "javascript:onArchiveClick()"), array('Delete Invoice', "javascript:onDeleteClick()"), ) ) , array('id'=>'primaryActions', 'style'=>'text-align:left', 'data-bind'=>'css: $root.enable.save'))->split(); --}} @else {{ Button::success('Save Invoice', array('id' => 'saveButton', 'onclick' => 'onSaveClick()')) }} @endif {{ Button::normal('Email Invoice', array('id' => 'email_button', 'onclick' => 'onEmailClick()'))->append_with_icon('send'); }} @if ($invoice) {{ Button::primary('Enter Payment', array('onclick' => 'onPaymentClick()'))->append_with_icon('usd'); }} @endif @endif

 

{{ Former::close() }}
@stop