Bugzilla – Attachment 36395 Details for
Bug 8007
Discharge management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8007: Discharge - DBIx changes
Bug-8007-Discharge---DBIx-changes.patch (text/plain), 4.11 KB, created by
Biblibre Sandboxes
on 2015-03-03 11:22:54 UTC
(
hide
)
Description:
Bug 8007: Discharge - DBIx changes
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2015-03-03 11:22:54 UTC
Size:
4.11 KB
patch
obsolete
>From 81629e4840f189cfd18b0ffd25eeda199b7c98c8 Mon Sep 17 00:00:00 2001 >From: Yohann Dufour <dufour.yohann@gmail.com> >Date: Mon, 4 Aug 2014 16:09:27 +0200 >Subject: [PATCH] Bug 8007: Discharge - DBIx changes > >Signed-off-by: Lucie <lucie.rousseaux@dracenie.com> >--- > Koha/Schema/Result/Borrower.pm | 15 +++++ > Koha/Schema/Result/BorrowerDebarment.pm | 8 +-- > Koha/Schema/Result/Discharge.pm | 91 +++++++++++++++++++++++++++++++ > 3 files changed, 110 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/Discharge.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 4dbd0ce..8bf91ab 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -813,6 +813,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 discharges >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Discharge> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "discharges", >+ "Koha::Schema::Result::Discharge", >+ { "foreign.borrower" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 hold_fill_targets > > Type: has_many >diff --git a/Koha/Schema/Result/BorrowerDebarment.pm b/Koha/Schema/Result/BorrowerDebarment.pm >index 3620873..45a25ff 100644 >--- a/Koha/Schema/Result/BorrowerDebarment.pm >+++ b/Koha/Schema/Result/BorrowerDebarment.pm >@@ -45,7 +45,7 @@ __PACKAGE__->table("borrower_debarments"); > > data_type: 'enum' > default_value: 'MANUAL' >- extra: {list => ["SUSPENSION","OVERDUES","MANUAL"]} >+ extra: {list => ["SUSPENSION","OVERDUES","MANUAL","DISCHARGE"]} > is_nullable: 0 > > =head2 comment >@@ -84,7 +84,7 @@ __PACKAGE__->add_columns( > { > data_type => "enum", > default_value => "MANUAL", >- extra => { list => ["SUSPENSION", "OVERDUES", "MANUAL"] }, >+ extra => { list => ["SUSPENSION", "OVERDUES", "MANUAL", "DISCHARGE"] }, > is_nullable => 0, > }, > "comment", >@@ -136,8 +136,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-31 01:30:23 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vq6rOYGJBK8Mw2YFAX52Vg >+# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-01-07 17:25:44 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4KkoPNcgZoANIScMWUyS/w > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Discharge.pm b/Koha/Schema/Result/Discharge.pm >new file mode 100644 >index 0000000..8f9c60c >--- /dev/null >+++ b/Koha/Schema/Result/Discharge.pm >@@ -0,0 +1,91 @@ >+use utf8; >+package Koha::Schema::Result::Discharge; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::Discharge >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<discharges> >+ >+=cut >+ >+__PACKAGE__->table("discharges"); >+ >+=head1 ACCESSORS >+ >+=head2 borrower >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+=head2 needed >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+=head2 validated >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "borrower", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "needed", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, >+ "validated", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, >+); >+ >+=head1 RELATIONS >+ >+=head2 borrower >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "borrower", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "borrower" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-01-08 18:15:13 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uq7Zb0SNf2mD3cpC4oub9A >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >1.7.10.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 8007
:
14490
|
16622
|
16935
|
17484
|
17485
|
21394
|
21395
|
21396
|
21660
|
21674
|
21675
|
21676
|
21677
|
21678
|
24023
|
24024
|
24025
|
24026
|
24027
|
30531
|
30532
|
30533
|
30534
|
30535
|
31007
|
34034
|
34035
|
34036
|
34037
|
34038
|
34039
|
34668
|
34669
|
34670
|
34671
|
34672
|
34673
|
34674
|
34675
|
36180
|
36181
|
36182
|
36183
|
36184
|
36185
|
36186
|
36187
|
36394
|
36395
|
36396
|
36397
|
36398
|
36399
|
36400
|
36401
|
37029
|
37030
|
37031
|
37032
|
37033
|
37034
|
37035
|
37036
|
37037
|
38596
|
38597