Bugzilla – Attachment 67490 Details for
Bug 18120
CRUD endpoint for vendors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18120: Tidy up
Bug-18120-Tidy-up.patch (text/plain), 2.71 KB, created by
Jonathan Druart
on 2017-09-29 20:10:33 UTC
(
hide
)
Description:
Bug 18120: Tidy up
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-09-29 20:10:33 UTC
Size:
2.71 KB
patch
obsolete
>From 3a084a45282408de44765fe2bf771905623e84f8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 29 Sep 2017 17:08:28 -0300 >Subject: [PATCH] Bug 18120: Tidy up > >--- > Koha/REST/V1/Acquisitions/Vendors.pm | 37 +++++++++++------------------------- > 1 file changed, 11 insertions(+), 26 deletions(-) > >diff --git a/Koha/REST/V1/Acquisitions/Vendors.pm b/Koha/REST/V1/Acquisitions/Vendors.pm >index a24412952d..5f86ac82d4 100644 >--- a/Koha/REST/V1/Acquisitions/Vendors.pm >+++ b/Koha/REST/V1/Acquisitions/Vendors.pm >@@ -192,11 +192,8 @@ the attribute names the exposed REST api spec. > =cut > > sub _to_api { >- > my $vendor = shift; > >- #my $vendor = $vendor_param->TO_JSON; >- > # Delete unused fields > delete $vendor->{booksellerfax}; > delete $vendor->{bookselleremail}; >@@ -205,16 +202,11 @@ sub _to_api { > delete $vendor->{othersupplier}; > > # Rename changed fields >- $vendor->{list_currency} = $vendor->{listprice}; >- delete $vendor->{listprice}; >- $vendor->{invoice_currency} = $vendor->{invoiceprice}; >- delete $vendor->{invoiceprice}; >- $vendor->{gst} = $vendor->{gstreg}; >- delete $vendor->{gstreg}; >- $vendor->{list_includes_gst} = $vendor->{listincgst}; >- delete $vendor->{listincgst}; >- $vendor->{invoice_includes_gst} = $vendor->{invoiceincgst}; >- delete $vendor->{invoiceincgst}; >+ $vendor->{list_currency} = delete $vendor->{listprice}; >+ $vendor->{invoice_currency} = delete $vendor->{invoiceprice}; >+ $vendor->{gst} = delete $vendor->{gstreg}; >+ $vendor->{list_includes_gst} = delete $vendor->{listincgst}; >+ $vendor->{invoice_includes_gst} = delete $vendor->{invoiceincgst}; > > return $vendor; > } >@@ -227,21 +219,14 @@ attribute names. > =cut > > sub _to_model { >- my $vendor_param = shift; >- >- my $vendor = $vendor_param; >+ my $vendor = shift; > > # Rename back >- $vendor->{listprice} = $vendor->{list_currency}; >- delete $vendor->{list_currency}; >- $vendor->{invoiceprice} = $vendor->{invoice_currency}; >- delete $vendor->{invoice_currency}; >- $vendor->{gstreg} = $vendor->{gst}; >- delete $vendor->{gst}; >- $vendor->{listincgst} = $vendor->{list_includes_gst}; >- delete $vendor->{list_includes_gst}; >- $vendor->{invoiceincgst} = $vendor->{invoice_includes_gst}; >- delete $vendor->{invoice_includes_gst}; >+ $vendor->{listprice} = delete $vendor->{list_currency}; >+ $vendor->{invoiceprice} = delete $vendor->{invoice_currency}; >+ $vendor->{gstreg} = delete $vendor->{gst}; >+ $vendor->{listincgst} = delete $vendor->{list_includes_gst}; >+ $vendor->{invoiceincgst} = delete $vendor->{invoice_includes_gst}; > > return $vendor; > } >-- >2.11.0
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 18120
:
60851
|
60852
|
61182
|
61183
|
61587
|
63146
|
63163
|
63164
|
63165
|
66046
|
66362
|
66363
|
66417
|
66418
|
66427
|
66428
|
66429
|
66430
|
67326
|
67327
|
67328
|
67329
|
67330
| 67490