mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on activity tracking
This commit is contained in:
parent
ab4d9d4792
commit
7b41fbc779
@ -25,7 +25,7 @@ class ClientController extends \BaseController {
|
|||||||
})
|
})
|
||||||
->addColumn('contact', function($model)
|
->addColumn('contact', function($model)
|
||||||
{
|
{
|
||||||
return $model->contacts[0]->fullName();
|
return $model->contacts[0]->getFullName();
|
||||||
})
|
})
|
||||||
->addColumn('last_login', function($model)
|
->addColumn('last_login', function($model)
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,10 @@ class InvoiceController extends \BaseController {
|
|||||||
public function view($invoiceKey)
|
public function view($invoiceKey)
|
||||||
{
|
{
|
||||||
$invoice = Invoice::with('invoice_items', 'client.account.account_gateways')->where('invoice_key', '=', $invoiceKey)->firstOrFail();
|
$invoice = Invoice::with('invoice_items', 'client.account.account_gateways')->where('invoice_key', '=', $invoiceKey)->firstOrFail();
|
||||||
|
$contact = null;
|
||||||
|
|
||||||
|
Activity::viewInvoice($invoice, $contact)
|
||||||
|
|
||||||
return View::make('invoices.view')->with('invoice', $invoice);
|
return View::make('invoices.view')->with('invoice', $invoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,6 +102,7 @@ class InvoiceController extends \BaseController {
|
|||||||
$payment = new Payment;
|
$payment = new Payment;
|
||||||
$payment->invoice_id = $invoice->id;
|
$payment->invoice_id = $invoice->id;
|
||||||
$payment->account_id = $invoice->account_id;
|
$payment->account_id = $invoice->account_id;
|
||||||
|
$payment->contact_id = 0;
|
||||||
$payment->transaction_reference = $response->getTransactionReference();
|
$payment->transaction_reference = $response->getTransactionReference();
|
||||||
$payment->save();
|
$payment->save();
|
||||||
|
|
||||||
@ -272,6 +277,8 @@ class InvoiceController extends \BaseController {
|
|||||||
$message->to($contact->email);
|
$message->to($contact->email);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Activity::emailInvoice($invoice, $contact);
|
||||||
|
|
||||||
Session::flash('message', 'Successfully emailed invoice');
|
Session::flash('message', 'Successfully emailed invoice');
|
||||||
} else {
|
} else {
|
||||||
Session::flash('message', 'Successfully saved invoice');
|
Session::flash('message', 'Successfully saved invoice');
|
||||||
|
@ -10,6 +10,7 @@ class ConfideSetupUsersTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
Schema::dropIfExists('activities');
|
||||||
Schema::dropIfExists('account_gateways');
|
Schema::dropIfExists('account_gateways');
|
||||||
Schema::dropIfExists('gateways');
|
Schema::dropIfExists('gateways');
|
||||||
Schema::dropIfExists('products');
|
Schema::dropIfExists('products');
|
||||||
@ -176,13 +177,13 @@ class ConfideSetupUsersTable extends Migration {
|
|||||||
//$t->foreign('account_id')->references('id')->on('accounts');
|
//$t->foreign('account_id')->references('id')->on('accounts');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Schema::create('payments', function($t)
|
Schema::create('payments', function($t)
|
||||||
{
|
{
|
||||||
$t->increments('id');
|
$t->increments('id');
|
||||||
$t->integer('invoice_id');
|
$t->integer('invoice_id');
|
||||||
$t->integer('account_id');
|
$t->integer('account_id');
|
||||||
|
$t->integer('contact_id');
|
||||||
|
$t->integer('user_id');
|
||||||
$t->timestamps();
|
$t->timestamps();
|
||||||
$t->softDeletes();
|
$t->softDeletes();
|
||||||
|
|
||||||
@ -193,6 +194,20 @@ class ConfideSetupUsersTable extends Migration {
|
|||||||
//$t->foreign('account_id')->references('id')->on('accounts');
|
//$t->foreign('account_id')->references('id')->on('accounts');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Schema::create('activities', function($t)
|
||||||
|
{
|
||||||
|
$t->increments('id');
|
||||||
|
$t->integer('account_id');
|
||||||
|
$t->integer('user_id');
|
||||||
|
$t->integer('client_id');
|
||||||
|
$t->integer('contact_id');
|
||||||
|
$t->integer('invoice_id');
|
||||||
|
$t->integer('payment_id');
|
||||||
|
$t->timestamps();
|
||||||
|
|
||||||
|
$t->integer('activity_type_id');
|
||||||
|
$t->text('message');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -202,6 +217,7 @@ class ConfideSetupUsersTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
|
Schema::dropIfExists('activities');
|
||||||
Schema::dropIfExists('account_gateways');
|
Schema::dropIfExists('account_gateways');
|
||||||
Schema::dropIfExists('gateways');
|
Schema::dropIfExists('gateways');
|
||||||
Schema::dropIfExists('products');
|
Schema::dropIfExists('products');
|
||||||
|
@ -11,5 +11,11 @@ class ConstantsSeeder extends Seeder
|
|||||||
'name' => 'PayPal Express',
|
'name' => 'PayPal Express',
|
||||||
'provider' => 'PayPal_Express'
|
'provider' => 'PayPal_Express'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
/*
|
||||||
|
ActivityType::create(array(
|
||||||
|
'name' => 'Created invoice'
|
||||||
|
));
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,12 +5,18 @@ class UserTableSeeder extends Seeder
|
|||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
DB::table('users')->delete();
|
//DB::table('users')->delete();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
User::create(array(
|
$account = Account::create(array(
|
||||||
'first_name' => 'Hillel',
|
'name' => 'Acme Inc',
|
||||||
|
));
|
||||||
|
|
||||||
|
$user = User::create(array(
|
||||||
|
'account_id' => $account->id,
|
||||||
|
'first_name' => 'Hillel',
|
||||||
'last_name' => 'Coren',
|
'last_name' => 'Coren',
|
||||||
'email' => 'hillelcoren@gmail.com',
|
'email' => 'hillelcoren@gmail.com',
|
||||||
'password' => Hash::make('1234'),
|
'password' => Hash::make('1234'),
|
||||||
));
|
));
|
||||||
*/
|
*/
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
define("ACTIVITY_TYPE_CREATE_CLIENT", 1);
|
||||||
|
define("ACTIVITY_TYPE_ARCHIVE_CLIENT", 2);
|
||||||
|
define("ACTIVITY_TYPE_CREATE_INVOICE", 3);
|
||||||
|
define("ACTIVITY_TYPE_EMAIL_INVOICE", 4);
|
||||||
|
define("ACTIVITY_TYPE_VIEW_INVOICE", 5);
|
||||||
|
define("ACTIVITY_TYPE_ARCHIVE_INVOICE", 6);
|
||||||
|
define("ACTIVITY_TYPE_CREATE_PAYMENT", 7);
|
||||||
|
define("ACTIVITY_TYPE_ARCHIVE_PAYMENT", 8);
|
||||||
|
|
||||||
class Activity extends Eloquent
|
class Activity extends Eloquent
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
|
||||||
define("ACTIVITY_TYPE_CONTACT_VIEW_INVOICE", 11);
|
|
||||||
define("ACTIVITY_TYPE_CONTACT_LOGIN", 12);
|
|
||||||
*/
|
|
||||||
|
|
||||||
private static function getBlank()
|
private static function getBlank()
|
||||||
{
|
{
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
@ -66,20 +69,19 @@ define("ACTIVITY_TYPE_CONTACT_LOGIN", 12);
|
|||||||
$activity->save();
|
$activity->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function createPayment($payment, $contact)
|
public static function createPayment($payment)
|
||||||
{
|
{
|
||||||
if ($contact)
|
if (Auth::check())
|
||||||
{
|
|
||||||
$activity = new Activity;
|
|
||||||
$activity->contact_id = $contact->id;
|
|
||||||
$activity->message = $contact->getFullName() . ' created payment ' . $payment->transaction_reference;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$activity = Activity::getBlank();
|
$activity = Activity::getBlank();
|
||||||
$activity->message = $user->getFullName() . ' created invoice ' . $payment->transaction_reference;
|
$activity->message = $user->getFullName() . ' created invoice ' . $payment->transaction_reference;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$activity = new Activity;
|
||||||
|
$activity->contact_id = $payment->contact_id;
|
||||||
|
$activity->message = $contact->getFullName() . ' created payment ' . $payment->transaction_reference;
|
||||||
|
}
|
||||||
|
|
||||||
$activity->payment_id = $payment->id;
|
$activity->payment_id = $payment->id;
|
||||||
$activity->invoice_id = $payment->invoice_id;
|
$activity->invoice_id = $payment->invoice_id;
|
||||||
@ -101,7 +103,7 @@ define("ACTIVITY_TYPE_CONTACT_LOGIN", 12);
|
|||||||
public static function viewInvoice($invoice, $contact)
|
public static function viewInvoice($invoice, $contact)
|
||||||
{
|
{
|
||||||
$activity = new Activity;
|
$activity = new Activity;
|
||||||
$activity->contact_id = $contact->id;
|
//$activity->contact_id = $contact->id;
|
||||||
$activity->invoice_id = $invoice->id;
|
$activity->invoice_id = $invoice->id;
|
||||||
$activity->client_id = $invoice->client_id;
|
$activity->client_id = $invoice->client_id;
|
||||||
$activity->activity_type_id = ACTIVITY_TYPE_VIEW_INVOICE;
|
$activity->activity_type_id = ACTIVITY_TYPE_VIEW_INVOICE;
|
||||||
|
@ -28,3 +28,8 @@ class Client extends Eloquent
|
|||||||
return $this->hasMany('Contact');
|
return $this->hasMany('Contact');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Client::created(function($client)
|
||||||
|
{
|
||||||
|
Activity::createClient($client);
|
||||||
|
});
|
@ -14,11 +14,6 @@ class Contact extends Eloquent
|
|||||||
return $this->belongsTo('Client');
|
return $this->belongsTo('Client');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fullName()
|
|
||||||
{
|
|
||||||
return $this->first_name . ' ' . $this->last_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function lastLogin()
|
public function lastLogin()
|
||||||
{
|
{
|
||||||
if ($this->last_login == '0000-00-00 00:00:00')
|
if ($this->last_login == '0000-00-00 00:00:00')
|
||||||
@ -30,4 +25,18 @@ class Contact extends Eloquent
|
|||||||
return $this->last_login;
|
return $this->last_login;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFullName()
|
||||||
|
{
|
||||||
|
$fullName = $this->first_name . ' ' . $this->last_name;
|
||||||
|
|
||||||
|
if ($fullName == ' ')
|
||||||
|
{
|
||||||
|
return "Unknown";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $fullName;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -26,3 +26,8 @@ class Invoice extends Eloquent
|
|||||||
return $total;
|
return $total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Invoice::created(function($invoice)
|
||||||
|
{
|
||||||
|
Activity::createInvoice($invoice);
|
||||||
|
});
|
@ -9,3 +9,8 @@ class Payment extends Eloquent
|
|||||||
return $this->belongsTo('Invoice');
|
return $this->belongsTo('Invoice');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Payment::created(function($payment)
|
||||||
|
{
|
||||||
|
Activity::createPayment($payment);
|
||||||
|
});
|
@ -68,4 +68,17 @@ class User extends ConfideUser implements UserInterface, RemindableInterface {
|
|||||||
return $this->email;
|
return $this->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFullName()
|
||||||
|
{
|
||||||
|
$fullName = $this->first_name . ' ' . $this->last_name;
|
||||||
|
|
||||||
|
if ($fullName == ' ')
|
||||||
|
{
|
||||||
|
return "Unknown";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $fullName;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -261,11 +261,11 @@
|
|||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
||||||
<ul class="nav navbar-nav" style="font-weight: bold">
|
<ul class="nav navbar-nav" style="font-weight: bold">
|
||||||
{{ HTML::nav_link('home', 'Home') }}
|
{{-- HTML::nav_link('home', 'Home') --}}
|
||||||
{{ HTML::menu_link('client') }}
|
{{ HTML::menu_link('client') }}
|
||||||
{{ HTML::menu_link('invoice') }}
|
{{ HTML::menu_link('invoice') }}
|
||||||
{{ HTML::menu_link('payment') }}
|
{{ HTML::menu_link('payment') }}
|
||||||
{{ HTML::nav_link('reports', 'Reports') }}
|
{{-- HTML::nav_link('reports', 'Reports') --}}
|
||||||
</ul>
|
</ul>
|
||||||
<form class="navbar-form navbar-right" role="search">
|
<form class="navbar-form navbar-right" role="search">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -2,127 +2,114 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div class=".container">
|
|
||||||
<p> </p>
|
<p> </p>
|
||||||
|
|
||||||
<div class="row">
|
{{ Former::open($url)->method($method)->addClass('main_form')->rules(array(
|
||||||
|
'number' => 'required',
|
||||||
|
)); }}
|
||||||
|
|
||||||
<div class="col-md-6 col-sm-10">
|
<!-- <h3>{{ $title }} Invoice</h3> -->
|
||||||
<div>
|
|
||||||
{{ Former::open($url)->method($method)->addClass('main_form')->rules(array(
|
|
||||||
'number' => 'required',
|
|
||||||
)); }}
|
|
||||||
|
|
||||||
|
@if ($invoice)
|
||||||
|
{{ Former::populate($invoice); }}
|
||||||
|
{{ Former::populateField('issued_on', DateTime::createFromFormat('Y-m-d', $invoice->issued_on)->format('m/d/Y')); }}
|
||||||
|
@else
|
||||||
|
{{ Former::populateField('issued_on', date('m/d/Y')) }}
|
||||||
|
@endif
|
||||||
|
|
||||||
<!-- <h3>{{ $title }} Invoice</h3> -->
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
@if ($invoice)
|
{{ Former::select('client')->addOption('', '')->fromQuery($clients, 'name', 'id')->select($client ? $client->id : '')
|
||||||
{{ Former::populate($invoice); }}
|
->help('<a class="ul" data-toggle="modal" data-target="#myModal">Create new client</a>'); }}
|
||||||
{{ Former::populateField('issued_on', DateTime::createFromFormat('Y-m-d', $invoice->issued_on)->format('m/d/Y')); }}
|
|
||||||
@else
|
|
||||||
{{ Former::populateField('issued_on', date('m/d/Y')) }}
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
{{ Former::select('client')->addOption('', '')->fromQuery($clients, 'name', 'id')->select($client ? $client->id : '')
|
|
||||||
->help('<a class="ul" data-toggle="modal" data-target="#myModal">Create new client</a>'); }}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
{{ Former::text('number') }}
|
|
||||||
{{ Former::text('issued_on') }}
|
|
||||||
{{ Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'") }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p> </p>
|
|
||||||
</div>
|
|
||||||
<div style="padding-left:16px">
|
|
||||||
<input type="text" name="items" data-bind="value: ko.toJSON(items)" style="display:none"/>
|
|
||||||
<table class="table invoice-table" style="margin-bottom: 0px !important;">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="hide-border"></th>
|
|
||||||
<th>Item</th>
|
|
||||||
<th>Description</th>
|
|
||||||
<th>Unit Cost</th>
|
|
||||||
<th>Quantity</th>
|
|
||||||
<th>Line Total</th>
|
|
||||||
<th class="hide-border"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody data-bind="sortable: { data: items, afterMove: onDragged }">
|
|
||||||
<tr data-bind="event: { mouseover: showActions, mouseout: hideActions }" class="sortable-row">
|
|
||||||
<td style="width:50px;" class="hide-border">
|
|
||||||
<i data-bind="click: $parent.addItem, visible: actionsVisible" class="fa fa-plus-circle" style="cursor:pointer" title="Add item"></i>
|
|
||||||
<i data-bind="visible: actionsVisible" class="fa fa-sort"></i>
|
|
||||||
</td>
|
|
||||||
<td style="width:120px">
|
|
||||||
<input data-bind="value: product_key, valueUpdate: 'afterkeydown'" onchange="refreshPDF()"/>
|
|
||||||
</td>
|
|
||||||
<td style="width:300px">
|
|
||||||
<textarea data-bind="value: notes, valueUpdate: 'afterkeydown'" rows="1" cols="60" onchange="refreshPDF()"></textarea>
|
|
||||||
</td>
|
|
||||||
<td style="width:100px">
|
|
||||||
<input data-bind="value: cost, valueUpdate: 'afterkeydown'" style="text-align: right" onchange="refreshPDF()"//>
|
|
||||||
</td>
|
|
||||||
<td style="width:80px">
|
|
||||||
<input data-bind="value: qty, valueUpdate: 'afterkeydown'" style="text-align: right" onchange="refreshPDF()"//>
|
|
||||||
</td>
|
|
||||||
<!--
|
|
||||||
<td style="width:100px">
|
|
||||||
<input data-bind="value: tax, valueUpdate: 'afterkeydown'"/>
|
|
||||||
</td>
|
|
||||||
-->
|
|
||||||
<td style="width:100px;background-color: #FFFFFF;text-align: right">
|
|
||||||
<span data-bind="text: total"></span>
|
|
||||||
</td>
|
|
||||||
<td style="width:20px; cursor:pointer" class="hide-border">
|
|
||||||
<i data-bind="click: $parent.removeItem, visible: actionsVisible() && $parent.items().length > 1" class="fa fa-minus-circle" title="Remove item"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr data-bind="visible: subtotal() != total()">
|
|
||||||
<td colspan="3" class="hide-border"/>
|
|
||||||
<td colspan="2">Subtotal</td>
|
|
||||||
<td style="text-align: right"><span data-bind="text: subtotal"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr data-bind="visible: discount() > 0">
|
|
||||||
<td colspan="3" class="hide-border"/>
|
|
||||||
<td colspan="2">Discount</td>
|
|
||||||
<td style="text-align: right"><span data-bind="text: discounted"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" class="hide-border"/>
|
|
||||||
<td colspan="2">Invoice Total</td>
|
|
||||||
<td style="text-align: right"><span data-bind="text: total"/></td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="checkbox" name="send_email_checkBox" id="send_email_checkBox" value="true" style="display:none"/>
|
|
||||||
|
|
||||||
<p> </p>
|
|
||||||
<div class="form-actions">
|
|
||||||
{{ Button::primary('Download PDF', array('onclick' => 'onDownloadClick()')) }}
|
|
||||||
{{ Button::primary_submit('Save Invoice') }}
|
|
||||||
{{ Button::primary('Send Email', array('onclick' => 'onEmailClick()')) }}
|
|
||||||
</div>
|
|
||||||
<p> </p>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-5">
|
||||||
<!-- <textarea rows="20" cols="120" id="pdfText" onkeyup="runCode()"></textarea> -->
|
{{ Former::text('number')->label('Invoice #') }}
|
||||||
<!-- <iframe frameborder="1" width="600" height="600" style="display:block;margin: 0 auto"></iframe> -->
|
{{ Former::text('issued_on')->label('Invoice Date') }}
|
||||||
<iframe frameborder="1" width="92%" height="600" style="display:block;margin: 0 auto"></iframe>
|
{{-- Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'") --}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
|
|
||||||
|
<input type="text" name="items" data-bind="value: ko.toJSON(items)" style="display:none"/>
|
||||||
|
<table class="table invoice-table" style="margin-bottom: 0px !important;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="hide-border"></th>
|
||||||
|
<th>Item</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Unit Cost</th>
|
||||||
|
<th>Quantity</th>
|
||||||
|
<th>Line Total</th>
|
||||||
|
<th class="hide-border"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody data-bind="sortable: { data: items, afterMove: onDragged }">
|
||||||
|
<tr data-bind="event: { mouseover: showActions, mouseout: hideActions }" class="sortable-row">
|
||||||
|
<td style="width:50px;" class="hide-border">
|
||||||
|
<i data-bind="click: $parent.addItem, visible: actionsVisible" class="fa fa-plus-circle" style="cursor:pointer" title="Add item"></i>
|
||||||
|
<i data-bind="visible: actionsVisible" class="fa fa-sort"></i>
|
||||||
|
</td>
|
||||||
|
<td style="width:120px">
|
||||||
|
<input data-bind="value: product_key, valueUpdate: 'afterkeydown'" onchange="refreshPDF()"/>
|
||||||
|
</td>
|
||||||
|
<td style="width:300px">
|
||||||
|
<textarea data-bind="value: notes, valueUpdate: 'afterkeydown'" rows="1" cols="60" onchange="refreshPDF()"></textarea>
|
||||||
|
</td>
|
||||||
|
<td style="width:100px">
|
||||||
|
<input data-bind="value: cost, valueUpdate: 'afterkeydown'" style="text-align: right" onchange="refreshPDF()"//>
|
||||||
|
</td>
|
||||||
|
<td style="width:80px">
|
||||||
|
<input data-bind="value: qty, valueUpdate: 'afterkeydown'" style="text-align: right" onchange="refreshPDF()"//>
|
||||||
|
</td>
|
||||||
|
<!--
|
||||||
|
<td style="width:100px">
|
||||||
|
<input data-bind="value: tax, valueUpdate: 'afterkeydown'"/>
|
||||||
|
</td>
|
||||||
|
-->
|
||||||
|
<td style="width:100px;background-color: #FFFFFF;text-align: right">
|
||||||
|
<span data-bind="text: total"></span>
|
||||||
|
</td>
|
||||||
|
<td style="width:20px; cursor:pointer" class="hide-border">
|
||||||
|
<i data-bind="click: $parent.removeItem, visible: actionsVisible() && $parent.items().length > 1" class="fa fa-minus-circle" title="Remove item"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr data-bind="visible: subtotal() != total()">
|
||||||
|
<td colspan="3" class="hide-border"/>
|
||||||
|
<td colspan="2">Subtotal</td>
|
||||||
|
<td style="text-align: right"><span data-bind="text: subtotal"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr data-bind="visible: discount() > 0">
|
||||||
|
<td colspan="3" class="hide-border"/>
|
||||||
|
<td colspan="2">Discount</td>
|
||||||
|
<td style="text-align: right"><span data-bind="text: discounted"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="hide-border"/>
|
||||||
|
<td colspan="2">Invoice Total</td>
|
||||||
|
<td style="text-align: right"><span data-bind="text: total"/></td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<input type="checkbox" name="send_email_checkBox" id="send_email_checkBox" value="true" style="display:none"/>
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
|
<div class="form-actions">
|
||||||
|
{{ Button::primary('Download PDF', array('onclick' => 'onDownloadClick()')) }}
|
||||||
|
{{ Button::primary_submit('Save Invoice') }}
|
||||||
|
{{ Button::primary('Send Email', array('onclick' => 'onEmailClick()')) }}
|
||||||
|
</div>
|
||||||
|
<p> </p>
|
||||||
|
|
||||||
|
<!-- <textarea rows="20" cols="120" id="pdfText" onkeyup="runCode()"></textarea> -->
|
||||||
|
<!-- <iframe frameborder="1" width="600" height="600" style="display:block;margin: 0 auto"></iframe> -->
|
||||||
|
<iframe frameborder="1" width="92%" height="600" style="display:block;margin: 0 auto"></iframe>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user