added fixes for budget view and working essential
This commit is contained in:
parent
af6d198c8f
commit
ebcc79fd36
6 changed files with 55 additions and 10 deletions
|
@ -81,4 +81,14 @@ __PACKAGE__->might_have(
|
|||
"Pear::LocalLoop::Schema::Result::TransactionCategory" => "transaction_id",
|
||||
);
|
||||
|
||||
sub sqlt_deploy_hook {
|
||||
my ( $source_instance, $sqlt_table ) = @_;
|
||||
my $pending_field = $sqlt_table->get_field('essential');
|
||||
if ( $sqlt_table->schema->translator->producer_type =~ /SQLite$/ ) {
|
||||
$pending_field->{default_value} = 0;
|
||||
} else {
|
||||
$pending_field->{default_value} = \"false";
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -15,6 +15,7 @@ SELECT "transactions.value",
|
|||
"transactions.purchase_time",
|
||||
"transactions.buyer_id",
|
||||
"transactions.seller_id",
|
||||
"transactions.essential",
|
||||
"transaction_category.category_id",
|
||||
DATE_TRUNC('hour', "transactions.purchase_time") AS "quantised_hours",
|
||||
DATE_TRUNC('day', "transactions.purchase_time") AS "quantised_days",
|
||||
|
|
|
@ -15,6 +15,7 @@ SELECT "transactions"."value",
|
|||
"transactions"."purchase_time",
|
||||
"transactions"."buyer_id",
|
||||
"transactions"."seller_id",
|
||||
"transactions"."essential",
|
||||
"transaction_category"."category_id",
|
||||
DATETIME(STRFTIME('%Y-%m-%d %H:00:00',"transactions"."purchase_time")) AS "quantised_hours",
|
||||
DATETIME(STRFTIME('%Y-%m-%d 00:00:00',"transactions"."purchase_time")) AS "quantised_days",
|
||||
|
|
|
@ -15,6 +15,7 @@ SELECT "value",
|
|||
"purchase_time",
|
||||
"buyer_id",
|
||||
"seller_id",
|
||||
"essential",
|
||||
DATE_TRUNC('hour', "purchase_time") AS "quantised_hours",
|
||||
DATE_TRUNC('day', "purchase_time") AS "quantised_days",
|
||||
DATE_TRUNC('week', "purchase_time") AS "quantised_weeks"
|
||||
|
|
|
@ -15,6 +15,7 @@ SELECT "value",
|
|||
"purchase_time",
|
||||
"buyer_id",
|
||||
"seller_id",
|
||||
"essential",
|
||||
DATETIME(STRFTIME('%Y-%m-%d %H:00:00',"purchase_time")) AS "quantised_hours",
|
||||
DATETIME(STRFTIME('%Y-%m-%d 00:00:00',"purchase_time")) AS "quantised_days",
|
||||
DATETIME(STRFTIME('%Y-%m-%d 00:00:00',"purchase_time", 'weekday 1')) AS "quantised_weeks"
|
||||
|
|
Reference in a new issue