Bugzilla – Attachment 6040 Details for
Bug 4161
When adding Vendor default to active currencies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4161: Preselect active currency for new vendors
Bug-4161-Preselect-active-currency-for-new-vendors.patch (text/plain), 2.06 KB, created by
Katrin Fischer
on 2011-10-24 16:40:26 UTC
(
hide
)
Description:
Bug 4161: Preselect active currency for new vendors
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-10-24 16:40:26 UTC
Size:
2.06 KB
patch
obsolete
>From 6ad20002eb720a2baf8e9897f498565cb77ccd07 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Mon, 24 Oct 2011 17:48:29 +0200 >Subject: [PATCH] Bug 4161: Preselect active currency for new vendors > >Currently when creating a new vendor in acquisitions the alphabetical first >currency will be preselected. For better usability and less mistakes the >active curency should be preselected. > >To test: >Check your currency settings in administration. >Your active currency should not be the first in the list. > >1) Create a new vendor >Verify the active currency is selected for list and invoice prices. > >2) Check vendor summary page >Verify the correct currencies from the vendor record are shown here. > >2) Edit vendor >Verify the correct currencies from the vendor record are shown here. >--- > acqui/supplier.pl | 18 ++++++++++++++---- > 1 files changed, 14 insertions(+), 4 deletions(-) > >diff --git a/acqui/supplier.pl b/acqui/supplier.pl >index 2a4078a..44ff250 100755 >--- a/acqui/supplier.pl >+++ b/acqui/supplier.pl >@@ -122,12 +122,22 @@ if ( $op eq 'display' ) { > } else { > my @currencies = GetCurrencies(); > my $loop_currency; >+ my $active_currency = GetCurrency(); >+ my $active_listprice = $supplier->{'listprice'}; >+ my $active_invoiceprice = $supplier->{'invoiceprice'}; >+ if (!$supplier->{listprice}) { >+ $active_listprice = $active_currency->{currency}; >+ } >+ if (!$supplier->{invoiceprice}) { >+ $active_invoiceprice = $active_currency->{currency}; >+ } > for (@currencies) { > push @{$loop_currency}, >- { currency => $_->{currency}, >- listprice => ( $_->{currency} eq $supplier->{listprice} ), >- invoiceprice => ( $_->{currency} eq $supplier->{invoiceprice} ), >- }; >+ { >+ currency => $_->{currency}, >+ listprice => ( $_->{currency} eq $active_listprice ), >+ invoiceprice => ( $_->{currency} eq $active_invoiceprice ), >+ }; > } > > my $default_gst_rate = (C4::Context->preference('gist') * 100) || '0.0'; >-- >1.7.5.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 4161
:
6040
|
6096