From f8c62633f9f18ba8381f5c8e94c42d68a81adb8c Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Tue, 28 Apr 2009 22:57:32 +0200 Subject: [PATCH] updatesupplier deal with gst at supplier level --- acqui/updatesupplier.pl | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl index b8ea15f874..3a3b395a10 100755 --- a/acqui/updatesupplier.pl +++ b/acqui/updatesupplier.pl @@ -5,6 +5,7 @@ # Copyright 2000-2002 Katipo Communications +# Copyright 2008-2009 BibLibre SARL # # This file is part of Koha. # @@ -38,12 +39,13 @@ supplier, id, company, company_postal, physical, company_phone, physical, company_phone, company_fax, website, company_contact_name, company_contact_position, contact_phone, contact_phone_2, contact_fax, company_email, contact_notes, notes, status, publishers_imprints, -list_currency, gst, list_gst, invoice_gst, discount. +list_currency, gst, list_gst, invoice_gst, discount, gstrate. =back =cut - +use C4::Context; +use C4::Auth; use C4::Bookseller; use C4::Biblio; use C4::Output; @@ -51,6 +53,16 @@ use CGI; use strict; my $input=new CGI; +my ($template, $loggedinuser, $cookie) = get_template_and_user( + { template_name => "", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { acquisition => 'vendors_manage' }, + debug => 1, + } +); + #print $input->header(); my $supplier=$input->param('supplier'); #print startpage; @@ -84,7 +96,10 @@ $data{'invoiceprice'}=$input->param('invoice_currency'); $data{'gstreg'}=$input->param('gst'); $data{'listincgst'}=$input->param('list_gst'); $data{'invoiceincgst'}=$input->param('invoice_gst'); +#have to transform this into fraction so it's easier to use +$data{'gstrate'}=$input->param('gstrate')/100; $data{'discount'}=$input->param('discount'); +$data{'active'}=$input->param('status'); if($data{'name'}) { if ($data{'id'}){ ModBookseller(\%data); -- 2.39.5