Mandatory fields
+
-
-
+
+ @if($what == 'deposit' || $what == 'withdrawal')
+ @endif
+
+
+ @if($what == 'deposit' || $what == 'withdrawal')
+
+ @endif
+
+ @if($what == 'transfer')
-
-
+ @endif
+
+
+
+
-
-
@@ -76,10 +116,21 @@
Optional fields
+
+ @if($what == 'withdrawal')
+
+ @endif
+
+
+
+{{Form::close()}}
@stop
diff --git a/app/views/transactions/index.blade.php b/app/views/transactions/index.blade.php
index d4fb23fa78..50aefc1701 100644
--- a/app/views/transactions/index.blade.php
+++ b/app/views/transactions/index.blade.php
@@ -49,7 +49,15 @@
{{{$journal->transactions[1]->account->name}}}
@endif
-
Edit / delete |
+
+
+ |
@endforeach
diff --git a/bootstrap/start.php b/bootstrap/start.php
index f6ee9f005c..fbfbb5370f 100644
--- a/bootstrap/start.php
+++ b/bootstrap/start.php
@@ -12,6 +12,7 @@
*/
+
if (!function_exists('mf')) {
function mf($n, $coloured = true)
{
@@ -35,6 +36,8 @@ if (!function_exists('mf')) {
$app = new Illuminate\Foundation\Application;
+
+
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
@@ -83,6 +86,8 @@ $framework = $app['path.base'] .
require $framework . '/Illuminate/Foundation/start.php';
+Event::subscribe('Firefly\Helper\Form\FormTrigger');
+
/*
|--------------------------------------------------------------------------
| Return The Application
@@ -97,5 +102,11 @@ require $framework . '/Illuminate/Foundation/start.php';
// do something with events:
Event::subscribe('Firefly\Trigger\Limits\EloquentLimitTrigger');
+App::booted(function() {
+ $forms = new \Firefly\Helper\Form\FormTrigger;
+ $forms->registerFormExtensions();
+ }
+);
+
return $app;
diff --git a/public/assets/javascript/accounts.js b/public/assets/javascript/accounts.js
new file mode 100644
index 0000000000..67040dd4d5
--- /dev/null
+++ b/public/assets/javascript/accounts.js
@@ -0,0 +1,95 @@
+$(function () {
+if($('#chart').length == 1) {
+ /**
+ * get data from controller for home charts:
+ */
+ $.getJSON('chart/home/account/' + accountID).success(function (data) {
+ var options = {
+ chart: {
+ renderTo: 'chart',
+ type: 'line'
+ },
+
+ series: data,
+ title: {
+ text: 'BETTER TITLE HERE'
+ },
+ yAxis: {
+ formatter: function () {
+ return '$' + Highcharts.numberFormat(this.y, 0);
+ }
+ },
+ subtitle: {
+ text: '
View more',
+ useHTML: true
+ },
+
+ xAxis: {
+ floor: 0,
+ type: 'datetime',
+ dateTimeLabelFormats: {
+ day: '%e %b',
+ year: '%b'
+ },
+ title: {
+ text: 'Date'
+ }
+ },
+ tooltip: {
+ shared: true,
+ crosshairs: false,
+ formatter: function () {
+ var str = '
' + Highcharts.dateFormat("%A, %e %B", this.x) + '';
+ for (x in this.points) {
+ var point = this.points[x];
+ var colour = point.point.pointAttr[''].fill;
+ str += '
' + point.series.name + ': € ' + Highcharts.numberFormat(point.y, 2) + '
';
+ }
+ //console.log();
+ return str;
+ return '
' + this.series.name + ' on ' + Highcharts.dateFormat("%e %B", this.x) + ': € ' + Highcharts.numberFormat(this.y, 2);
+ }
+ },
+ plotOptions: {
+ line: {
+ shadow: true
+ },
+ series: {
+ cursor: 'pointer',
+ negativeColor: '#FF0000',
+ threshold: 0,
+ lineWidth: 1,
+ marker: {
+ radius: 2
+ },
+ point: {
+ events: {
+ click: function (e) {
+ hs.htmlExpand(null, {
+ src: 'chart/home/info/' + this.series.name + '/' + Highcharts.dateFormat("%d/%m/%Y", this.x),
+ pageOrigin: {
+ x: e.pageX,
+ y: e.pageY
+ },
+ objectType: 'ajax',
+ headingText: '
' + this.series.name + '',
+ width: 250
+ }
+ )
+ ;
+ }
+ }
+ }
+ }
+ },
+ credits: {
+ enabled: false
+ }
+ };
+ $('#chart').highcharts(options);
+ });
+}
+
+
+
+});
\ No newline at end of file
diff --git a/public/assets/javascript/index.js b/public/assets/javascript/index.js
index 02981645e4..e077bc457c 100644
--- a/public/assets/javascript/index.js
+++ b/public/assets/javascript/index.js
@@ -197,6 +197,7 @@ $(function () {
bar: {
dataLabels: {
enabled: true,
+ formatter: function() {return '€ ' + Highcharts.numberFormat(this.y,2);}
}
}
},
@@ -215,24 +216,6 @@ $(function () {
enabled: false
},
series: data.series
-// [
-// {
-// name: 'Budget in X',
-// data: [107, 31, 635, 203, 2]
-// },
-// {
-// name: 'Expense in X',
-// data: [107, 31, 635, 203, 2]
-// },
-// {
-// name: 'Budget now',
-// data: [133, 156, 947, 408, 6]
-// },
-// {
-// name: 'Expense now',
-// data: [973, 914, 454, 732, 34]
-// }
-// ]
});
});