[Koha-patches] [PATCH] (BUG #4521) aqbudgets.pl - Transform undefined budget spent value to 0.00 value

2010-05-18 Thread Alex Arnaud
This patch tranform the undefined value of budget spent to a money value which 
equals 0.00.
---
 admin/aqbudgets.pl |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl
index 8c6d2b4..569124a 100755
--- a/admin/aqbudgets.pl
+++ b/admin/aqbudgets.pl
@@ -294,6 +294,9 @@ if ($op eq 'add_form') {
 $$budget{$_}   = $num-format_price( $$budget{$_} ) if 
defined($$budget{$_})
}
 
+# Value of budget_spent equals 0 instead of undefined value
+$$budget{budget_spent} = $num-format_price(0) unless 
defined($$budget{budget_spent});
+
 my $borrower = GetMember( borrowernumber=$budget-{budget_owner_id} 
);
 $budget-{budget_owner_name} = $borrower-{'firstname'} . ' ' . 
$borrower-{'surname'};
 $budget-{budget_borrowernumber} = $borrower-{'borrowernumber'};
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (bug #4523) possibility to show / hide the filters menu

2010-05-18 Thread Alex Arnaud
---
 .../prog/en/modules/admin/aqbudgets.tmpl   |   24 +++
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
index fdb7410..0017e5e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
@@ -130,6 +130,17 @@
 $(#budgeth).treeTable();
 !-- /TMPL_IF --
 });
+function showHideFilters() {
+var menuFilters = document.getElementById(fundfilters);
+var content = document.getElementById(content);
+if (menuFilters.style.display == none) {
+menuFilters.style.display = block;
+content.style.marginLeft = 15em;
+} else {
+menuFilters.style.display = none;
+content.style.marginLeft = 4em;
+}
+}
 //]]
 /script
 !-- /TMPL_IF --
@@ -147,7 +158,7 @@
 div id=doc3 class=yui-t2
 div id=bd
 div id=yui-main
-div class=yui-b
+div class=yui-b id=content
 
 !-- TMPL_UNLESS name=delete_confirm --!-- TMPL_INCLUDE 
NAME=budgets-admin-toolbar.inc --!-- /TMPL_UNLESS --
 !-- TMPL_IF name=else --
@@ -385,8 +396,12 @@
 /div
 /div
 div class=yui-b
-!-- TMPL_IF NAME=else --form action=/cgi-bin/koha/admin/aqbudgets.pl 
method=get
-fieldset class=brief
+!-- TMPL_IF NAME=else --
+
+
+form action=/cgi-bin/koha/admin/aqbudgets.pl method=get 
+a href=# onclick=showHideFilters()Filters/a
+fieldset class=brief id=fundfilters
 h4Fund filters/h4
 ol
 li
@@ -413,8 +428,7 @@
 input type=hidden  name=budget_period_id value=!-- TMPL_VAR 
NAME=budget_period_id -- /
 input type=submit class=submit name=filter value=Go /
 /fieldset
-/form!-- /TMPL_IF --
-
+/form!-- /TMPL_IF --
 /div
 /div
 !-- TMPL_INCLUDE NAME=intranet-bottom.inc --
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4388) aqbudgets.pl: add a column in the table for display the total spent of level and sublevels

2010-04-14 Thread Alex Arnaud
---
 C4/Budgets.pm  |   32 
 admin/aqbudgets.pl |9 --
 .../prog/en/modules/admin/aqbudgets.tmpl   |3 ++
 3 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/C4/Budgets.pm b/C4/Budgets.pm
index eb97615..de19f59 100644
--- a/C4/Budgets.pm
+++ b/C4/Budgets.pm
@@ -41,6 +41,7 @@ BEGIN {
 GetBudgetSpent
 GetBudgetOrdered
 GetPeriodsCount
+GetChildBudgetsSpent
 
GetBudgetPeriod
 GetBudgetPeriods
@@ -678,6 +679,37 @@ gets all budgets
 =cut
 
 # ---
+sub GetChildBudgetsSpent {
+my ( $budget_id ) = @_;
+my $dbh = C4::Context-dbh;
+my $query = 
+SELECT *
+FROM   aqbudgets
+WHERE  budget_parent_id=?
+;
+my $sth = $dbh-prepare($query);
+$sth-execute( $budget_id );
+my $result = $sth-fetchall_arrayref({});
+my $total_spent = GetBudgetSpent($budget_id);
+if ($result){
+$total_spent += GetChildBudgetsSpent($_-{budget_id}) foreach 
@$result;
+}
+return $total_spent;
+}
+
+=head3 GetChildBudgetsSpent
+
+=over 4
+
+GetChildBudgetsSpent($budget-id);
+
+gets the total spent of the level and sublevels of $budget_id
+
+=back
+
+=cut
+
+# ---
 sub GetBudgets {
 my ($filters,$orderby) = @_;
 return SearchInTable(aqbudgets,$filters, $orderby, undef,undef, undef, 
wide);
diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl
index 8c6d2b4..5010ccd 100755
--- a/admin/aqbudgets.pl
+++ b/admin/aqbudgets.pl
@@ -68,7 +68,7 @@ if  (  not defined 
$template-{param_map}-{'CAN_user_acquisition_budget_add_del
 my $num=FormatNumber;
 
 my $script_name   = /cgi-bin/koha/admin/aqbudgets.pl;
-my $budget_hash=$input-Vars;
+my $budget_hash   = $input-Vars;
 my $budget_id = $$budget_hash{budget_id};
 my $budget_permission = $input-param('budget_permission');
 my $budget_period_dropbox = $input-param('budget_period_dropbox');
@@ -243,6 +243,9 @@ if ($op eq 'add_form') {
#This Looks WEIRD to me : should budgets be filtered in such a way ppl 
who donot own it would not see the amount spent on the budget by others ?
 
 foreach my $budget (@budgets) {
+#Level and sublevels total spent
+$budget-{'total_levels_spent'} = 
GetChildBudgetsSpent($budget-{budget_id});
+
 # PERMISSIONS
 unless($staffflags-{'superlibrarian'} % 2   == 1 ) {
 #IF NO PERMS, THEN DISABLE EDIT/DELETE
@@ -283,14 +286,14 @@ if ($op eq 'add_form') {
 # adds to total  - only if budget is a 'top-level' budget
 $period_alloc_total += $budget-{'budget_amount_total'} if 
$budget-{'depth'} == 0;
 $base_spent_total += $budget-{'budget_spent'};
-$budget-{'budget_remaining'} = $budget-{'budget_amount'} - 
$budget-{'budget_spent'};
+$budget-{'budget_remaining'} = $budget-{'budget_amount'} - 
$budget-{'total_levels_spent'};
 
 # if amount == 0 dont display...
 delete  $budget-{'budget_unalloc_sublevel'} if  
$budget-{'budget_unalloc_sublevel'} == 0 ;
 
 $budget-{'remaining_pos'} = 1 if $budget-{'budget_remaining'}  0;
 $budget-{'remaining_neg'} = 1 if $budget-{'budget_remaining'}  0;
-   for (grep 
{/budget_spent|budget_amount|budget_remaining|budget_unalloc/} keys %$budget){
+   for (grep 
{/total_levels_spent|budget_spent|budget_amount|budget_remaining|budget_unalloc/}
 keys %$budget){
 $$budget{$_}   = $num-format_price( $$budget{$_} ) if 
defined($$budget{$_})
}
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
index fdb7410..54e321a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
@@ -163,6 +163,7 @@
 thTotalbr /allocated/th
 thBase-levelbr /allocated/th
 thBase-levelbr /spent/th
+thTotal sublevelsbr /spent/th
 thBase-levelbr /remaining/th
 th class=tooltipcontentnbsp;/th
 thActions/th
@@ -174,6 +175,7 @@
 th nowrap=nowrap class=data !-- TMPL_VAR 
NAME=period_alloc_total--/th
 th nowrap=nowrap  class=data !-- TMPL_VAR 
NAME=base_alloc_total--/th
 th class=data!-- TMPL_VAR NAME=base_spent_total--/th
+th class=data!-- TMPL_VAR NAME=base_spent_total--/th
 th class=data!-- TMPL_VAR NAME=base_remaining_total--/th
 th class=tooltipcontent/th
 th/th
@@ -193,6 +195,7 @@
 td class=data!-- TMPL_VAR NAME=budget_amount_total --/td
 td class=data!-- TMPL_VAR NAME=budget_amount -- /td
 td class=data!-- TMPL_VAR NAME=budget_spent -- /td
+td class=data!-- TMPL_VAR NAME=total_levels_spent --/td
 

[Koha-patches] [PATCH] (BUG #4355) Basket.pl: withdrawal of the can not close the basket button

2010-03-31 Thread Alex Arnaud
Basket.pl: withdrawal of the can not close the basketbutton. only Uncerain
prices button is displayed. And removing the ?? in the price columns,
replaced by uncertain in rrp column
---
 acqui/basket.pl|6 ++
 .../prog/en/modules/acqui/basket.tmpl  |4 +++-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/acqui/basket.pl b/acqui/basket.pl
index 60c2a64..1e27d8f 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -257,10 +257,8 @@ if ( $op eq 'delete_confirm' ) {
 $line{line_total} = sprintf( %.2f, $line_total );
 $line{odd}= $i % 2;
 if ($line{uncertainprice}) {
-$template-param( unclosable = 1 );
-for my $key (qw/ecost line_total rrp/) {
-$line{$key} .= '??';
-}
+$template-param( uncertainprices = 1 );
+$line{rrp} .= ' (Uncertain)';
 }
if ($line{'title'}){
my $volume = $results[$i]-{'volume'};
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
index 1a237ef..e67e838 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
@@ -78,8 +78,9 @@
 // YUI Toolbar Functions
 function yuiToolbar() {
 !-- TMPL_IF name=unclosable --
-new YAHOO.widget.Button(uncertpricesbutton);
 new YAHOO.widget.Button(closebutton, 
{disabled:true});
+!-- TMPL_ELSIF name=uncertainprices --
+new YAHOO.widget.Button(uncertpricesbutton);
 !-- TMPL_ELSE --
 new YAHOO.widget.Button(closebutton);
 !-- /TMPL_IF --
@@ -94,6 +95,7 @@
 lia href=javascript:confirm_deletion(); 
class=button id=delbasketbuttonDelete this basket/a/li
 !-- TMPL_IF name=unclosable --
 libutton onclick=confirm_close() 
class=yui-button-disabled id=closebutton type=push disabled=true 
title=You can not close this basket Can not close basket/a/li
+!-- TMPL_ELSIF name=uncertainprices --
 lia 
href=/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=!-- TMPL_VAR 
name=booksellerid --amp;owner=1 class=button 
id=uncertpricesbuttonUncertain prices/a/li
 !-- TMPL_ELSE --
 lia href=!-- TMPL_VAR name=script_name 
--?op=closeamp;basketno=!-- TMPL_VAR name=basketno 
--amp;booksellerid=!-- TMPL_VAR name=booksellerid -- class=button 
id=closebuttonClose this basket/a/li
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4356) Basket.pl: adding a link to the basketgroup

2010-03-31 Thread Alex Arnaud
---
 acqui/basket.pl|1 +
 .../prog/en/modules/acqui/basket.tmpl  |   10 +-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/acqui/basket.pl b/acqui/basket.pl
index 1e27d8f..51ea00a 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -207,6 +207,7 @@ if ( $op eq 'delete_confirm' ) {
name =   No group);
 if ( ! $basket-{basketgroupid} ) {
 $emptygroup{default} = 1;
+$emptygroup{nogroup} = 1;
 }
 unshift( @$basketgroups, \%emptygroup );
 }
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
index e67e838..5a2a853 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
@@ -162,7 +162,15 @@
 form action=/cgi-bin/koha/acqui/basketgroup.pl 
method=post
 pClosed on:  !-- TMPL_VAR name=closedate --/p
 !-- TMPL_IF name=basketgroups --
-p basketgroup: select id=basketgroupid 
name=basketgroupid
+p basketgroup:
+!-- TMPL_LOOP name=basketgroups --
+!-- TMPL_IF name=default --
+!-- TMPL_UNLESS name=nogroup -- 
+a 
href=/cgi-bin/koha/acqui/basketgroup.pl?op=addbooksellerid=!-- TMPL_VAR 
name=basketgroups --basketgroupid=!-- TMPL_VAR name=id --!-- 
TMPL_VAR name=name --/a
+!-- /TMPL_UNLESS -- 
+!-- /TMPL_IF --
+!-- /TMPL_LOOP --
+select id=basketgroupid name=basketgroupid
 !-- TMPL_LOOP name=basketgroups --
 !-- TMPL_IF name=default --
 option value=!-- TMPL_VAR name=id -- 
selected=selected!-- TMPL_VAR name=name --/option
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4357) Closing a basket and creating baskets group

2010-03-31 Thread Alex Arnaud
when closing a basket without creating a basketgroup, the group is still 
created = corrected
+ replace create a basketgroup? by create a purchase order now? in 
confirmation step.
---
 acqui/basket.pl|2 +-
 .../prog/en/modules/acqui/basket.tmpl  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/acqui/basket.pl b/acqui/basket.pl
index 5947b0b..96c3a32 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -161,7 +161,7 @@ if ( $op eq 'delete_confirm' ) {
  basketgroupid = $basketgroupid } );
 print 
$query-redirect('/cgi-bin/koha/acqui/basketgroup.pl?booksellerid='.$booksellerid);
 } else {
-print 
$query-redirect('/cgi-bin/koha/acqui/basketgroup.pl?basketno='.$basketno.'amp;op=attachbasketamp;booksellerid='
 . $booksellerid);
+print 
$query-redirect('/cgi-bin/koha/acqui/booksellers.pl?supplierid=' . 
$booksellerid);
 }
 exit;
 } else {
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
index d54906b..665e2a0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
@@ -298,7 +298,7 @@
 form action=/cgi-bin/koha/acqui/basket.pl class=confirm
 h1Are you sure you want to close basket !-- TMPL_VAR 
name=basketname --?/h1
 p
-label for=createbasketgroupCreate basket group?/label
+label for=createbasketgroupcreate a purchase order now?/label
 input type=checkbox id=createbasketgroup 
name=createbasketgroup/
 /p
 input type=hidden id=basketno value=!-- TMPL_VAR 
name=basketno -- name=basketno /
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4348) parcel.pl: list with duplicates orders after a clearfilter

2010-03-30 Thread Alex Arnaud
---
 acqui/parcel.pl|2 ++
 .../prog/en/modules/acqui/parcel.tmpl  |9 +
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/acqui/parcel.pl b/acqui/parcel.pl
index f4a4b19..247613c 100755
--- a/acqui/parcel.pl
+++ b/acqui/parcel.pl
@@ -109,6 +109,8 @@ if($input-param('format') eq json){
 $data-{ordernumber} = $order-{ordernumber};
 $data-{title} = $order-{title};
 $data-{author} = $order-{author};
+$data-{isbn} = $order-{isbn};
+$data-{booksellerid} = $order-{booksellerid};
 $data-{biblionumber} = $order-{biblionumber};
 $data-{freight} = $order-{freight};
 $data-{quantity} = $order-{quantity};
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
index a4775eb..bc71bac 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
@@ -83,13 +83,13 @@
 
for( i = 0 ; i  orders.length ; i++){
order = orders[i];
-   $('tr'
+   $('tr class=orderfound'
+ 'td class=basketfilterclassa 
href=/cgi-bin/koha/acqui/basket.pl?basketno=' + order.basketno + '' + 
order.basketno + '/a/td'
-   + 'td class=orderfilterclass ' + order.ordernumber 
+ ' /td'
+   + 'td class=orderfilterclass a 
href=neworderempty.pl?ordernumber=' + order.ordernumber + 'booksellerid=' + 
order.booksellerid + '' + order.ordernumber + ' /a/td'
+ 'td class=summaryfilterclass'
-   + 'a 
href=/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + order.biblionumber + 
'' + order.title + '/a / ' + order.author + 'ndash;' + order.isbn + '/td'
+   + 'a 
href=/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + order.biblionumber + 
'' + order.title + '/a by ' + order.author + 'nbsp;ndash;nbsp;' + 
order.isbn + '/td'
+ 'tda 
href=/cgi-bin/koha/catalogue/showmarc.pl?id=' + order.biblionumber + ' 
title=MARC rel=gb_page_center[600,500]MARC/a | a 
href=/cgi-bin/koha/catalogue/showmarc.pl?viewas=cardamp;id=' + 
order.biblionumber + ' title=MARC 
rel=gb_page_center[600,500]Card/a/td'
-   + 'td' + order.quantrem + ' / ' + order.quantity + 
'/td'
+   + 'td' + order.quantity + '/td'
+ 'td' + order.ecost + '/td'
+ 'td' + order.ordertotal + '/td'
+ 'td'
@@ -114,6 +114,7 @@
 function clearFilters() {
$(#nothingfoundrow).remove();
 $(#pendingt tbody.filterclass tr).show();
+$(#pendingt tbody.filterclass tr.orderfound).remove();
pendingExpand();
 }
 
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4349) In parcel.pl: replaces All x items are displayed by x items are displayed

2010-03-30 Thread Alex Arnaud
---
 .../prog/en/modules/acqui/parcel.tmpl  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
index bc71bac..926740c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
@@ -40,7 +40,7 @@
 function pendingExpand() {
$(#pendingcollapserow).remove();
$(#pendingt tr).show();
-   $(#pendingt).before(p id=\pendingcollapserow\All  + 
rowCountPending +  items are displayed. a 
href=\javascript:pendingCollapse();\Click here to show only the first  + 
rowsToCollapse +  items\/a.\/p);
+   $(#pendingt).before(p id=\pendingcollapserow\ + rowCountPending 
+  items are displayed. a href=\javascript:pendingCollapse();\Click here 
to show only the first  + rowsToCollapse +  items\/a.\/p);
 }
 
 // Collapse already received items table
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4350) parcel.tmpl: add Translatable text

2010-03-30 Thread Alex Arnaud
---
 .../prog/en/modules/acqui/parcel.tmpl  |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
index 926740c..086d314 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
@@ -32,7 +32,7 @@
 function pendingCollapse() {
$(#pendingcollapserow).remove();
$(#pendingt tbody.filterclass tr:gt( + (rowsToCollapse-1) + 
)).hide();
-   $(#pendingt).before(p id=\pendingcollapserow\Only the first  + 
rowsToCollapse +  items are displayed. a 
href=\javascript:pendingExpand();\Click here to show all  + rowCountPending 
+  items\/a.\/p);
+   $(#pendingt).before(p id=\pendingcollapserow\ + _(Only the 
first )  + rowsToCollapse +  _( items are displayed.) + a 
href=\javascript:pendingExpand();\ + _(Click here to show all )  + 
rowCountPending + _( items) + \/a.\/p);
 
 }
 
@@ -40,21 +40,21 @@
 function pendingExpand() {
$(#pendingcollapserow).remove();
$(#pendingt tr).show();
-   $(#pendingt).before(p id=\pendingcollapserow\ + rowCountPending 
+  items are displayed. a href=\javascript:pendingCollapse();\Click here 
to show only the first  + rowsToCollapse +  items\/a.\/p);
+   $(#pendingt).before(p id=\pendingcollapserow\ + rowCountPending 
+ _( items are displayed.) + a href=\javascript:pendingCollapse();\ + 
_(Click here to show only the first ) + rowsToCollapse + _( items) + 
\/a.\/p);
 }
 
 // Collapse already received items table
 function receivedCollapse() {
$(#receivedcollapserow).remove();
$(#receivedt tbody.filterclass tr:gt( + (rowsToCollapse-1) + 
)).hide();
-   $(#receivedt).before(p id=\receivedcollapserow\Only the first  
+ rowsToCollapse +  items are displayed. a 
href=\javascript:receivedExpand();\Click here to show all  + 
rowCountReceived +  items\/a.\/p);
+   $(#receivedt).before(p id=\receivedcollapserow\ + _(Only the 
first ) + rowsToCollapse + _( items are displayed.) + a 
href=\javascript:receivedExpand();\ + _(Click here to show all ) + 
rowCountReceived + _( items) + \/a.\/p);
 }
 
 // Expand already received items table
 function receivedExpand() {
$(#receivedcollapserow).remove();
$(#receivedt tr).show();
-   $(#receivedt).before(p id=\receivedcollapserow\All  + 
rowCountReceived +  items are displayed. a 
href=\javascript:receivedCollapse();\Click here to show only the first  + 
rowsToCollapse +  items\/a.\/p);
+   $(#receivedt).before(p id=\receivedcollapserow\ + _(All ) + 
rowCountReceived + _( items are displayed.) + a 
href=\javascript:receivedCollapse();\ + _(Click here to show only the 
first ) + rowsToCollapse + _( items) + \/a.\/p);
 }
 
 // Launch filtering
@@ -87,7 +87,7 @@
+ 'td class=basketfilterclassa 
href=/cgi-bin/koha/acqui/basket.pl?basketno=' + order.basketno + '' + 
order.basketno + '/a/td'
+ 'td class=orderfilterclass a 
href=neworderempty.pl?ordernumber=' + order.ordernumber + 'booksellerid=' + 
order.booksellerid + '' + order.ordernumber + ' /a/td'
+ 'td class=summaryfilterclass'
-   + 'a 
href=/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + order.biblionumber + 
'' + order.title + '/a by ' + order.author + 'nbsp;ndash;nbsp;' + 
order.isbn + '/td'
+   + 'a 
href=/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + order.biblionumber + 
'' + order.title + '/a' + _( by ) + order.author + 'nbsp;ndash;nbsp;' 
+ order.isbn + '/td'
+ 'tda 
href=/cgi-bin/koha/catalogue/showmarc.pl?id=' + order.biblionumber + ' 
title=MARC rel=gb_page_center[600,500]MARC/a | a 
href=/cgi-bin/koha/catalogue/showmarc.pl?viewas=cardamp;id=' + 
order.biblionumber + ' title=MARC 
rel=gb_page_center[600,500]Card/a/td'
+ 'td' + order.quantity + '/td'
+ 'td' + order.ecost + '/td'
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4351) The save button don't really save. Renaming in Next button

2010-03-30 Thread Alex Arnaud
---
 .../prog/en/modules/acqui/parcels.tmpl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
index a3bae10..2d98fba 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
@@ -115,7 +115,7 @@
div class=hint!-- TMPL_INCLUDE 
NAME=date-format.inc --/div/li
/ol
 /fieldset
-fieldset class=actioninput type=submit class=button 
value=Save / a class=cancel 
href=/cgi-bin/koha/acqui/supplier.pl?supplierid=!-- TMPL_VAR 
NAME=supplierid --Cancel/a/fieldset
+fieldset class=actioninput type=submit class=button 
value=Next / a class=cancel 
href=/cgi-bin/koha/acqui/supplier.pl?supplierid=!-- TMPL_VAR 
NAME=supplierid --Cancel/a/fieldset
 /form
 /div
 /div
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4352) Adding a popup at removing of a basket

2010-03-30 Thread Alex Arnaud
---
 .../prog/en/modules/acqui/basket.tmpl  |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
index 1b30ddc..1a237ef 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
@@ -25,6 +25,16 @@
 }
 //]]
 /script
+script type=text/javascript
+//![CDATA[
+function confirm_deletion() {
+var is_confirmed = confirm(_('Are you sure you want to delete 
this basket?'));
+if (is_confirmed) {
+window.location = !-- TMPL_VAR name=script_name 
--?op=delete_confirmbasketno=!-- TMPL_VAR name=basketno 
--booksellerid=!-- TMPL_VAR name=booksellerid --;
+}
+}
+//]]
+/script
 !-- TMPL_ELSE --
 !-- TMPL_UNLESS name=grouped --
 script type=text/javascript
@@ -81,7 +91,7 @@
 /script
 ul id=toolbar-list class=toolbar
 lia href=basketheader.pl?basketno=!-- TMPL_VAR 
NAME=basketno --amp;op=add_form class=button id=basketheadbuttonEdit 
basket header information/a/li
-lia href=!-- TMPL_VAR NAME=script_name 
--?op=del_basketamp;basketno=!-- TMPL_VAR NAME=basketno 
--amp;booksellerid=!-- TMPL_VAR NAME=booksellerid -- class=button 
id=delbasketbuttonDelete this basket/a/li
+lia href=javascript:confirm_deletion(); 
class=button id=delbasketbuttonDelete this basket/a/li
 !-- TMPL_IF name=unclosable --
 libutton onclick=confirm_close() 
class=yui-button-disabled id=closebutton type=push disabled=true 
title=You can not close this basket Can not close basket/a/li
 lia 
href=/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=!-- TMPL_VAR 
name=booksellerid --amp;owner=1 class=button 
id=uncertpricesbuttonUncertain prices/a/li
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4344) Basket.pl - remove the line contract number

2010-03-29 Thread Alex Arnaud
---
 .../prog/en/modules/acqui/basket.tmpl  |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
index 7890409..1b30ddc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
@@ -142,7 +142,6 @@
 !-- TMPL_IF NAME=basketnote --pInternal note: !-- 
TMPL_VAR NAME=basketnote --/p!-- /TMPL_IF --
 !-- TMPL_IF NAME=basketbooksellernote --pVendor note: 
!-- TMPL_VAR NAME=basketbooksellernote --/p!-- /TMPL_IF --
 !-- TMPL_IF NAME=basketcontractno --
-pContract number: !-- TMPL_VAR NAME=basketcontractno 
--/p
 pContract name: a 
href=../admin/aqcontract.pl?op=add_formamp;contractnumber=!-- TMPL_VAR 
NAME=basketcontractno --amp;booksellerid=!-- TMPL_VAR NAME=booksellerid 
--!-- TMPL_VAR NAME=basketcontractname --/a/p
 !-- /TMPL_IF --
 !-- TMPL_IF NAME=authorisedbyname --pManaged by:  !-- 
TMPL_VAR NAME=authorisedbyname --/p!-- /TMPL_IF --
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4345) Redirect after closing a basket and creation of a group

2010-03-29 Thread Alex Arnaud
after closing a basket and creation of a group we should landed on the Closed 
tab.
---
 acqui/basket.pl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/acqui/basket.pl b/acqui/basket.pl
index cd67046..60c2a64 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -159,7 +159,7 @@ if ( $op eq 'delete_confirm' ) {
 });
 ModBasket( { basketno = $basketno,
  basketgroupid = $basketgroupid } );
-print 
$query-redirect('/cgi-bin/koha/acqui/basketgroup.pl?booksellerid='.$booksellerid);
+print 
$query-redirect('/cgi-bin/koha/acqui/basketgroup.pl?booksellerid='.$booksellerid.'closed=1');
 } else {
 print 
$query-redirect('/cgi-bin/koha/acqui/basketgroup.pl?basketno='.$basketno.'amp;op=attachbasketamp;booksellerid='
 . $booksellerid);
 }
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4341) new order by creating a new record. collection title unsaved

2010-03-26 Thread Alex Arnaud
---
 acqui/addorder.pl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/acqui/addorder.pl b/acqui/addorder.pl
index 48ae874..2ab5252 100755
--- a/acqui/addorder.pl
+++ b/acqui/addorder.pl
@@ -195,7 +195,7 @@ if ( $orderinfo-{quantity} ne '0' ) {
 {
 biblio.title= $$orderinfo{title},
 biblio.author   = $$orderinfo{author},
-biblio.series   = $$orderinfo{series}  
? $$orderinfo{series}: ,
+biblio.seriestitle  = $$orderinfo{series}  
? $$orderinfo{series}: ,
 biblioitems.isbn= $$orderinfo{isbn}
? $$orderinfo{isbn}  : ,
 biblioitems.publishercode   = $$orderinfo{publishercode}   
? $$orderinfo{publishercode} : ,
 biblioitems.publicationyear = $$orderinfo{publicationyear} 
? $$orderinfo{publicationyear}: ,
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4342) should not be able to close an empty basket

2010-03-26 Thread Alex Arnaud
---
 acqui/basket.pl |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/acqui/basket.pl b/acqui/basket.pl
index 5947b0b..cd67046 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -288,6 +288,7 @@ if ( $op eq 'delete_confirm' ) {
my $total_est_gste = $total_rrp_gste - ($total_rrp_gste * $discount);
 
 my $contract = GetContract($basket-{contractnumber});
+my @orders = GetOrders($basketno);
 $template-param(
 basketno = $basketno,
 basketname   = $basket-{'basketname'},
@@ -317,6 +318,7 @@ if ( $op eq 'delete_confirm' ) {
 GST  = $gist,
 basketgroups = $basketgroups,
 grouped  = $basket-{basketgroupid},
+unclosable   = @orders ? 0 : 1, 
 );
 }
 
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG #4332) Changed the display of ordered search results

2010-03-23 Thread Alex Arnaud
Changing the display of the basket column: changing basketNumber to my
basket (basketNumber).
Adding the Basket group column with fallowing display: my group (group
Number)
---
 C4/Acquisition.pm  |   14 ++
 .../prog/en/modules/acqui/histsearch.tmpl  |4 +++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm
index 9017586..4616d69 100644
--- a/C4/Acquisition.pm
+++ b/C4/Acquisition.pm
@@ -1672,7 +1672,11 @@ sub GetHistory {
 biblio.title,
 biblio.author,
 aqorders.basketno,
-name,aqbasket.creationdate,
+   aqbasket.basketname,
+   aqbasket.basketgroupid,
+   aqbasketgroups.name as groupname,
+aqbooksellers.name,
+   aqbasket.creationdate,
 aqorders.datereceived,
 aqorders.quantity,
 aqorders.quantityreceived,
@@ -1683,12 +1687,13 @@ sub GetHistory {
 aqorders.biblionumber
 FROM aqorders
 LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno
+   LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid=aqbasketgroups.id
 LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id
 LEFT JOIN biblio ON biblio.biblionumber=aqorders.biblionumber;
 
 $query .=  LEFT JOIN borrowers ON 
aqbasket.authorisedby=borrowers.borrowernumber
 if ( C4::Context-preference(IndependantBranches) );
-
+   
 $query .=  WHERE (datecancellationprinted is NULL or 
datecancellationprinted='-00-00') ;
 
 my @query_params  = ();
@@ -1704,7 +1709,7 @@ sub GetHistory {
 }
 
 if ( defined $name ) {
-$query .=  AND name LIKE ? ;
+$query .=  AND aqbooksellers.name LIKE ? ;
 push @query_params, %$name%;
 }
 
@@ -1725,7 +1730,8 @@ sub GetHistory {
 push @query_params, $userenv-{branch};
 }
 }
-$query .=  ORDER BY booksellerid;
+$query .=  ORDER BY id;
+   warn $query;
 my $sth = $dbh-prepare($query);
 $sth-execute( @query_params );
 my $cnt = 1;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl
index d83516b..4ceaad4 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl
@@ -60,6 +60,7 @@
table
tr
thBasket/th
+   thBasket group/th
thInvoice Number/th
thSummary/th
thVendor/th
@@ -71,7 +72,8 @@

!-- TMPL_LOOP NAME=suggestions_loop --
tr
-tda href=basket.pl?basketno=!-- TMPL_VAR 
name=basketno --!-- TMPL_VAR name=basketno --/a/td
+td!-- TMPL_VAR name=basketname -- (a 
href=basket.pl?basketno=!-- TMPL_VAR name=basketno --!-- TMPL_VAR 
name=basketno --/a)/td
+   td!-- TMPL_VAR name=groupname -- (a 
href=basketgroup.pl?booksellerid=!-- TMPL_VAR name=id --!-- TMPL_VAR 
name=basketgroupid --/a)/td
td!-- TMPL_IF NAME=invoicenumber 
--
a 
href=/cgi-bin/koha/acqui/parcel.pl?invoice=!-- TMPL_VAR 
NAME=invoicenumber--amp;supplierid=!-- TMPL_VAR 
NAME=id--amp;datereceived=!-- TMPL_VAR NAME=datereceived --!-- 
TMPL_VAR NAME=invoicenumber--/a
!-- TMPL_ELSE --
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] (BUG 4325) Standardize buttons cancel

2010-03-19 Thread Alex Arnaud
This patch modifies the a.cancel class of the 
/home/alex/workspace/versions/koha32/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
 file
and a.cancel class of 
/home/alex/workspace/versions/koha32/koha-tmpl/opac-tmpl/prog/en/css/opac.css 
file
---
 .../intranet-tmpl/prog/en/css/staff-global.css |   27 +-
 koha-tmpl/opac-tmpl/prog/en/css/opac.css   |   29 ++-
 2 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css 
b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
index 190c9da..8cb0963 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
@@ -698,8 +698,31 @@ width: 100%;
 }
 
 a.cancel {
-   padding-left : 1em;
+   font-size: 13.px;
+   font-family: Sans;
+   text-decoration: none;
+   cursor: default;
+   background : #E8E8E8 url(../../img/button-bg.gif) top left repeat-x;
+   border-bottom-color: #99;
+   border-bottom-style: outset;
+   border-bottom-width: 1px;
+   border-left-color: #666;
+   border-left-style: outset;
+   border-left-width: 1px;
+   border-right-color: #99;
+   border-right-style: outset;
+   border-right-width: 1px;
+   border-top-color: #66;
+   border-top-style: outset;
+   border-top-width: 1px;
+   color: #33;
+   padding: 0.34em;
+   
 }
+a.cancel:before {
+   content:url(../../img/deny.gif);
+   vertical-align:middle;
+ }
 
 fieldset.rows fieldset.action {
padding : 1em;
@@ -1864,4 +1887,4 @@ img.spinner {
 }
 #cataloguing_additem_itemlist div {
overflow : scroll;
-}
\ No newline at end of file
+}
diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css 
b/koha-tmpl/opac-tmpl/prog/en/css/opac.css
index b590473..17a80db 100644
--- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css
+++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css
@@ -941,7 +941,32 @@ h2 span.hint {
margin : 0pt 5px 5px 0pt;
 }
 a.cancel {
-   padding-left : 1em;
+   text-decoration: none;
+   background-attachment:scroll;
+   background-position:0 0;
+   background : #B8D0E6 url(../../images/submit-bg.gif) top left repeat-x;
+   border-bottom-color:#EE;
+   border-bottom-style:solid;
+   border-bottom-width:1px;
+   border-left-color:#CC;
+   border-left-style:solid;
+   border-left-width:1px;
+   border-right-color:#EE;
+   border-right-style:solid;
+   border-right-width:1px;
+   border-top-color:#CC;
+   border-top-style:solid;
+   border-top-width:1px;
+   color:#33;
+   font-size:93%;
+   font-weight:bold;
+   padding:4.5px;
+}
+
+a.cancel:before{
+   content:url(../../images/shelf-delete.gif);
+   vertical-align:middle;
+   padding-right: 1.5px;
 }
 
 a.hidemytags {
@@ -1947,4 +1972,4 @@ a.p1:active {
 
 div.ft {
clear : both;
-}
\ No newline at end of file
+}
-- 
1.6.3.3

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches