Bugzilla – Attachment 70415 Details for
Bug 19166
Add the ability to add adjustments to an invoice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19166: DO NOT PUSH - Schema updates
Bug-19166-DO-NOT-PUSH---Schema-updates.patch (text/plain), 5.83 KB, created by
Nick Clemens (kidclamp)
on 2018-01-10 18:35:01 UTC
(
hide
)
Description:
Bug 19166: DO NOT PUSH - Schema updates
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-01-10 18:35:01 UTC
Size:
5.83 KB
patch
obsolete
>From 2002a757a19126c727f5e31c09827d9f607eafad Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 4 Oct 2017 13:24:48 +0000 >Subject: [PATCH] Bug 19166: DO NOT PUSH - Schema updates > >Included to ease testing :-) >--- > Koha/Schema/Result/Aqbudget.pm | 19 +++- > Koha/Schema/Result/Aqinvoice.pm | 19 +++- > Koha/Schema/Result/InvoiceAdjustment.pm | 155 ++++++++++++++++++++++++++++++++ > 3 files changed, 189 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/InvoiceAdjustment.pm > >diff --git a/Koha/Schema/Result/Aqbudget.pm b/Koha/Schema/Result/Aqbudget.pm >index 12a8c8d..4e7bef4 100644 >--- a/Koha/Schema/Result/Aqbudget.pm >+++ b/Koha/Schema/Result/Aqbudget.pm >@@ -242,6 +242,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 invoice_adjustments >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::InvoiceAdjustment> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "invoice_adjustments", >+ "Koha::Schema::Result::InvoiceAdjustment", >+ { "foreign.budget_id" => "self.budget_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 suggestions > > Type: has_many >@@ -283,8 +298,8 @@ Composing rels: L</aqbudgetborrowers> -> borrowernumber > __PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07033 @ 2015-03-04 10:26:49 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E4J/D0+2j0/8JZd0YRnoeA >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-04 13:24:01 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xi2wYYXl8vHkwOd0WYtsAQ > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Aqinvoice.pm b/Koha/Schema/Result/Aqinvoice.pm >index 365379e..487fc53 100644 >--- a/Koha/Schema/Result/Aqinvoice.pm >+++ b/Koha/Schema/Result/Aqinvoice.pm >@@ -143,6 +143,21 @@ __PACKAGE__->belongs_to( > { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > >+=head2 invoice_adjustments >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::InvoiceAdjustment> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "invoice_adjustments", >+ "Koha::Schema::Result::InvoiceAdjustment", >+ { "foreign.invoiceid" => "self.invoiceid" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 message > > Type: belongs_to >@@ -184,8 +199,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-09-18 16:21:46 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FPZXlNt8dkjhgt2Rtc+krQ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-04 13:24:01 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GaAbldBJaPoaufp8Hin/3Q > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/InvoiceAdjustment.pm b/Koha/Schema/Result/InvoiceAdjustment.pm >new file mode 100644 >index 0000000..4112022 >--- /dev/null >+++ b/Koha/Schema/Result/InvoiceAdjustment.pm >@@ -0,0 +1,155 @@ >+use utf8; >+package Koha::Schema::Result::InvoiceAdjustment; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::InvoiceAdjustment >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<invoice_adjustments> >+ >+=cut >+ >+__PACKAGE__->table("invoice_adjustments"); >+ >+=head1 ACCESSORS >+ >+=head2 adjustment_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 invoiceid >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 adjustment >+ >+ data_type: 'decimal' >+ is_nullable: 1 >+ size: [28,6] >+ >+=head2 reason >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 80 >+ >+=head2 note >+ >+ data_type: 'mediumtext' >+ is_nullable: 1 >+ >+=head2 budget_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+=head2 encumber_open >+ >+ data_type: 'smallint' >+ default_value: 1 >+ is_nullable: 0 >+ >+=head2 timestamp >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "adjustment_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "invoiceid", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "adjustment", >+ { data_type => "decimal", is_nullable => 1, size => [28, 6] }, >+ "reason", >+ { data_type => "varchar", is_nullable => 1, size => 80 }, >+ "note", >+ { data_type => "mediumtext", is_nullable => 1 }, >+ "budget_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "encumber_open", >+ { data_type => "smallint", default_value => 1, is_nullable => 0 }, >+ "timestamp", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</adjustment_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("adjustment_id"); >+ >+=head1 RELATIONS >+ >+=head2 budget >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Aqbudget> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "budget", >+ "Koha::Schema::Result::Aqbudget", >+ { budget_id => "budget_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 invoiceid >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Aqinvoice> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "invoiceid", >+ "Koha::Schema::Result::Aqinvoice", >+ { invoiceid => "invoiceid" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-09-26 14:15:50 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4hILsU7xo1mRBV13R2LXEg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19166
:
66475
|
66476
|
67599
|
67600
|
67601
|
67602
|
67890
|
70413
|
70414
|
70415
|
70416
|
72702
|
72703
|
72704
|
72705
|
72744
|
72978
|
73481
|
73482
|
73483
|
73484
|
73485
|
73486
|
73487
|
74742
|
74743
|
74744
|
74745
|
74746
|
74747
|
74748
|
74843
|
74893
|
74894
|
74895
|
74896
|
74897
|
74898
|
74899
|
74900
|
75014
|
75043
|
76994
|
76995
|
76996
|
76997
|
76998
|
76999
|
77000
|
77001
|
77002
|
77003
|
77004
|
77104
|
77105
|
77106
|
77107
|
77108
|
77109
|
77110
|
77111
|
77112
|
77113
|
77114
|
77115
|
77116
|
77117
|
77118
|
77119
|
77120
|
77121
|
77122
|
77123
|
77124
|
77125
|
77126
|
77127
|
77128
|
77129
|
77130
|
77131
|
77132
|
77133
|
77134
|
77329