Bugzilla – Attachment 146084 Details for
Bug 25655
Additionally store actual cost in foreign currency and currency from the invoice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25655: DBIC changes
Bug-25655-DBIC-changes.patch (text/plain), 3.33 KB, created by
PTFS Europe Sandboxes
on 2023-02-03 12:42:19 UTC
(
hide
)
Description:
Bug 25655: DBIC changes
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2023-02-03 12:42:19 UTC
Size:
3.33 KB
patch
obsolete
>From ccd0a25fb4bb1182436d10e3d9e4099f92b87ac9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 16 Jan 2023 21:58:45 +0100 >Subject: [PATCH] Bug 25655: DBIC changes > >Sponsored-by: The Research University in the Helmholtz Association (KIT) >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >--- > Koha/Schema/Result/Aqorder.pm | 45 ++++++++++++++++++++++++++++++++-- > Koha/Schema/Result/Currency.pm | 19 ++++++++++++-- > 2 files changed, 60 insertions(+), 4 deletions(-) > >diff --git a/Koha/Schema/Result/Aqorder.pm b/Koha/Schema/Result/Aqorder.pm >index 71c8753817..88a6d7e5a3 100644 >--- a/Koha/Schema/Result/Aqorder.pm >+++ b/Koha/Schema/Result/Aqorder.pm >@@ -414,6 +414,23 @@ reports received from suppliers > > Estimated delivery date > >+=head2 invoice_unitprice >+ >+ data_type: 'decimal' >+ is_nullable: 1 >+ size: [28,6] >+ >+the unit price in foreign currency >+ >+=head2 invoice_currency >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+the currency of the invoice_unitprice >+ > =cut > > __PACKAGE__->add_columns( >@@ -527,6 +544,10 @@ __PACKAGE__->add_columns( > { data_type => "mediumtext", is_nullable => 1 }, > "estimated_delivery_date", > { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >+ "invoice_unitprice", >+ { data_type => "decimal", is_nullable => 1, size => [28, 6] }, >+ "invoice_currency", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, > ); > > =head1 PRIMARY KEY >@@ -713,6 +734,26 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 invoice_currency >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Currency> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "invoice_currency", >+ "Koha::Schema::Result::Currency", >+ { currency => "invoice_currency" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "SET NULL", >+ }, >+); >+ > =head2 invoiceid > > Type: belongs_to >@@ -764,8 +805,8 @@ Composing rels: L</aqorder_users> -> borrowernumber > __PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-16 13:56:20 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M8HvWBKYFNGspSTakU6Qdg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-01-16 20:27:53 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j+1KthANw+mepqimVi57Ug > > __PACKAGE__->belongs_to( > "basket", >diff --git a/Koha/Schema/Result/Currency.pm b/Koha/Schema/Result/Currency.pm >index 720fa5ac59..0574f87b89 100644 >--- a/Koha/Schema/Result/Currency.pm >+++ b/Koha/Schema/Result/Currency.pm >@@ -157,9 +157,24 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 aqorders_invoice_currencies > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-01 14:23:58 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PnJEcCgrM1Edf99phWFdyQ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Aqorder> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "aqorders_invoice_currencies", >+ "Koha::Schema::Result::Aqorder", >+ { "foreign.invoice_currency" => "self.currency" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-01-16 20:27:54 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m6A1v4/u0oxoKG2ridxKgA > > > sub koha_object_class { >-- >2.30.2
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 25655
:
144618
|
145906
|
145907
|
145908
|
145909
|
145910
|
145911
|
145912
|
146082
|
146084
|
146085
|
146086
|
146087
|
146088
|
146089
|
146478
|
146479
|
146480
|
146481
|
146482
|
146483
|
146484
|
146658
|
146660
|
146818
|
146819
|
146820
|
146821
|
146822
|
146823
|
146824
|
146825
|
146826