Bugzilla – Attachment 93569 Details for
Bug 23049
Replace MANUAL_INV authorised value with a dedicated table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23049: Update DBIC Classes for branch limitations
Bug-23049-Update-DBIC-Classes-for-branch-limitatio.patch (text/plain), 7.73 KB, created by
Biblibre Sandboxes
on 2019-10-03 11:54:24 UTC
(
hide
)
Description:
Bug 23049: Update DBIC Classes for branch limitations
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2019-10-03 11:54:24 UTC
Size:
7.73 KB
patch
obsolete
>From 25ddd241f259655a775debc2b1d00594198949e2 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 26 Sep 2019 15:06:44 +0100 >Subject: [PATCH] Bug 23049: Update DBIC Classes for branch limitations >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > Koha/Schema/Result/AcDebitTypesBranch.pm | 97 ++++++++++++++++++++++++++ > Koha/Schema/Result/AccountDebitType.pm | 113 +++++++++++++++++++++++++++++++ > Koha/Schema/Result/Accountline.pm | 33 ++++++++- > Koha/Schema/Result/Branch.pm | 19 +++++- > 4 files changed, 258 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/AcDebitTypesBranch.pm > create mode 100644 Koha/Schema/Result/AccountDebitType.pm > >diff --git a/Koha/Schema/Result/AcDebitTypesBranch.pm b/Koha/Schema/Result/AcDebitTypesBranch.pm >new file mode 100644 >index 0000000..314b248 >--- /dev/null >+++ b/Koha/Schema/Result/AcDebitTypesBranch.pm >@@ -0,0 +1,97 @@ >+use utf8; >+package Koha::Schema::Result::AcDebitTypesBranch; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::AcDebitTypesBranch >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<ac_debit_types_branches> >+ >+=cut >+ >+__PACKAGE__->table("ac_debit_types_branches"); >+ >+=head1 ACCESSORS >+ >+=head2 debit_type_code >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 16 >+ >+=head2 branchcode >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "debit_type_code", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 16 }, >+ "branchcode", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >+); >+ >+=head1 RELATIONS >+ >+=head2 branchcode >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "branchcode", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "RESTRICT", >+ }, >+); >+ >+=head2 debit_type_code >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::AccountDebitType> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "debit_type_code", >+ "Koha::Schema::Result::AccountDebitType", >+ { code => "debit_type_code" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "RESTRICT", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-26 15:59:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:y7zhbS7uj5zRCOskakhzLA >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/AccountDebitType.pm b/Koha/Schema/Result/AccountDebitType.pm >new file mode 100644 >index 0000000..808c76a >--- /dev/null >+++ b/Koha/Schema/Result/AccountDebitType.pm >@@ -0,0 +1,113 @@ >+use utf8; >+package Koha::Schema::Result::AccountDebitType; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::AccountDebitType >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<account_debit_types> >+ >+=cut >+ >+__PACKAGE__->table("account_debit_types"); >+ >+=head1 ACCESSORS >+ >+=head2 code >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 16 >+ >+=head2 default_amount >+ >+ data_type: 'decimal' >+ is_nullable: 1 >+ size: [28,6] >+ >+=head2 description >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 200 >+ >+=head2 can_be_added_manually >+ >+ data_type: 'tinyint' >+ default_value: 1 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "code", >+ { data_type => "varchar", is_nullable => 0, size => 16 }, >+ "default_amount", >+ { data_type => "decimal", is_nullable => 1, size => [28, 6] }, >+ "description", >+ { data_type => "varchar", is_nullable => 1, size => 200 }, >+ "can_be_added_manually", >+ { data_type => "tinyint", default_value => 1, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</code> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("code"); >+ >+=head1 RELATIONS >+ >+=head2 ac_debit_types_branches >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::AcDebitTypesBranch> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "ac_debit_types_branches", >+ "Koha::Schema::Result::AcDebitTypesBranch", >+ { "foreign.debit_type_code" => "self.code" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 accountlines >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Accountline> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "accountlines", >+ "Koha::Schema::Result::Accountline", >+ { "foreign.debit_type" => "self.code" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-26 15:59:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jMTwuzzf39606BEjXzPGng >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm >index c2ae858..3a9072f 100644 >--- a/Koha/Schema/Result/Accountline.pm >+++ b/Koha/Schema/Result/Accountline.pm >@@ -69,6 +69,13 @@ __PACKAGE__->table("accountlines"); > is_nullable: 1 > size: 80 > >+=head2 debit_type >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 16 >+ > =head2 status > > data_type: 'varchar' >@@ -143,6 +150,8 @@ __PACKAGE__->add_columns( > { data_type => "longtext", is_nullable => 1 }, > "accounttype", > { data_type => "varchar", is_nullable => 1, size => 80 }, >+ "debit_type", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 16 }, > "status", > { data_type => "varchar", is_nullable => 1, size => 16 }, > "payment_type", >@@ -252,6 +261,26 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 debit_type >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::AccountDebitType> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "debit_type", >+ "Koha::Schema::Result::AccountDebitType", >+ { code => "debit_type" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > =head2 itemnumber > > Type: belongs_to >@@ -313,8 +342,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-23 10:45:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L+QlTTT+MdGoA3shpyaBgQ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-26 15:59:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d0RP5LSuBHb3UF0Fcof11g > > sub koha_objects_class { > 'Koha::Account::Lines'; >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index 6191b31..fa9679e 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -211,6 +211,21 @@ __PACKAGE__->set_primary_key("branchcode"); > > =head1 RELATIONS > >+=head2 ac_debit_types_branches >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::AcDebitTypesBranch> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "ac_debit_types_branches", >+ "Koha::Schema::Result::AcDebitTypesBranch", >+ { "foreign.branchcode" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 accountlines > > Type: has_many >@@ -677,8 +692,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-23 10:45:22 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KDg4i49bpMxXQ1LP6OZFWQ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-26 15:59:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IiEBfDpMBAi9cv7OqevVRQ > > __PACKAGE__->add_columns( > '+pickup_location' => { is_boolean => 1 } >-- >2.7.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 23049
:
93513
|
93514
|
93515
|
93516
|
93518
|
93519
|
93520
|
93521
|
93522
|
93523
|
93529
|
93557
|
93564
|
93565
|
93567
|
93568
|
93569
|
93570
|
93571
|
93572
|
93573
|
93574
|
93575
|
93576
|
93577
|
93578
|
93579
|
93960
|
93961
|
93962
|
93963
|
93964
|
93965
|
93966
|
93967
|
93968
|
93969
|
93970
|
93972
|
93973
|
93974
|
93975
|
93976
|
93977
|
93978
|
93979
|
93989
|
93990
|
93991
|
93992
|
93993
|
93994
|
93995
|
93996
|
93997
|
93998
|
93999
|
94000
|
94001
|
94002
|
94003
|
94004
|
94005
|
94006
|
94007
|
94008
|
94073
|
94074
|
94075
|
94076
|
94077
|
94078
|
94079
|
94080
|
94081
|
94082
|
94083
|
94084
|
94085
|
94086
|
94087
|
94088
|
94089
|
94090
|
94091
|
94092
|
94093
|
94111
|
94112
|
94113
|
94114
|
94115
|
94116
|
94117
|
94118
|
94119
|
94120
|
94121
|
94122
|
94123
|
94124
|
94125
|
94126
|
94127
|
94128
|
94129
|
94130
|
94131
|
94132
|
94133
|
94134
|
94135
|
94136
|
94137
|
94138
|
94139
|
94140
|
94141
|
94142
|
94143
|
94144
|
94145
|
94146
|
94147
|
94148
|
94149
|
94150
|
94151
|
94152
|
94165
|
94307
|
94308
|
94309
|
94310
|
94311
|
94312
|
94313
|
94314
|
94315
|
94316
|
94317
|
94318
|
94319
|
94320
|
94321
|
94323
|
94324
|
94325
|
94326
|
94327
|
94328
|
94329
|
94331
|
94332
|
94333
|
94334
|
94335
|
94336
|
94337
|
94338
|
94339
|
94340
|
94341
|
94342
|
94343
|
94344
|
94345
|
94346
|
94347
|
94348
|
94349
|
94350
|
94351
|
94352
|
94648