diff -crB htdocs.orig/modules/balanceadd.php htdocs/modules/balanceadd.php *** htdocs.orig/modules/balanceadd.php 2009-08-26 12:12:10.000000000 +0200 --- htdocs/modules/balanceadd.php 2009-08-26 14:18:38.000000000 +0200 *************** *** 121,126 **** --- 121,133 ---- $LMS->AddBalance($addbalance); } + if ($payment_id = $_POST['marks']) { + foreach ($payment_id as $id) { + $DB->Execute('UPDATE cashimport SET closed = 1 WHERE id = ?', + array($id)); + } + } + header('Location: ?'.$SESSION->get('backto')); ?> diff -crB htdocs.orig/modules/cashimport.php htdocs/modules/cashimport.php *** htdocs.orig/modules/cashimport.php 2009-08-26 12:12:10.000000000 +0200 --- htdocs/modules/cashimport.php 2009-08-26 14:50:16.000000000 +0200 *************** *** 198,207 **** --- 198,224 ---- } } + if($importlist_payments = $DB->GetAll('SELECT i.*, c.name + FROM cashimport i + LEFT JOIN cashsources c ON (i.sourceid = c.id) + WHERE i.closed = 0 AND i.value < 0 + ORDER BY i.id')) + { + $listdata_payments['total'] = sizeof($importlist_payments); + + foreach($importlist_payments as $idx => $row) + { + $divisions_payments[0]['list'][] = $row; + unset($importlist_payments[$idx]); + } + } + $SESSION->save('backto', $_SERVER['QUERY_STRING']); $SMARTY->assign('divisions', $divisions); + $SMARTY->assign('divisions_payments', $divisions_payments); $SMARTY->assign('listdata', isset($listdata) ? $listdata : NULL); + $SMARTY->assign('listdata_payments', isset($listdata_payments) ? $listdata_payments : NULL); $SMARTY->assign('error', $error); $SMARTY->assign('customerlist', $LMS->GetCustomerNames()); $SMARTY->assign('sourcelist', $DB->GetAll('SELECT id, name FROM cashsources ORDER BY name')); diff -crB htdocs.orig/templates/cashimport.html htdocs/templates/cashimport.html *** htdocs.orig/templates/cashimport.html 2009-08-26 12:12:10.000000000 +0200 --- htdocs/templates/cashimport.html 2009-08-26 14:50:03.000000000 +0200 *************** *** 34,42 **** //--> {/literal} !

!
{t}ID:{/t} --- 34,43 ---- //--> {/literal} !

+ + {cycle values="light,lucid" print=false} --- 67,73 ---- {$division.name} {cycle values="light,lucid" print=false} *************** *** 118,124 **** {t}Check All{/t} !
{t}ID:{/t} *************** *** 66,72 **** {$division.name} ! {t}Download (CSV){/t}
! {t}Download (CSV){/t}
! {t}Download all (TXT){/t} {t}Delete{/t} --- 119,125 ---- {t}Check All{/t} ! {t}Download all (TXT){/t} {t}Delete{/t} *************** *** 126,133 **** {t}Import{/t}
!

{if $error.lines}

--- 127,187 ---- {t}Import{/t} ! ! {foreach from=$divisions_payments item=division_payments}{if $division_payments.list} ! ! ! ! ! {cycle values="light,lucid" print=false} ! {foreach from=$division_payments.list item=item} ! ! ! ! ! ! ! ! ! ! ! {/foreach} ! {/if}{/foreach} ! ! ! ! ! !

{if $error.lines}

! {t}Payments List{/t} ! ! {t}Download (CSV){/t} !
! {$item.id|string_format:"%04d"} ! ! {$item.date|date_format:"%Y/%m/%d"} ! ! {$item.value|money_format} ! ! {if $item.customer}{$item.customer} ! {elseif $item.customerid} ! {assign var=cust value=$item.customerid} ! {$customerlist.$cust.customername} ! {/if} ! ! {$item.description} ! ! ! ! ! ! ! [ {t}Delete{/t} ] ! [ {t}Account payment{/t} ] !
! ! !