1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) { 9 header("location: index.php"); 10 exit; 11} 12 13/** 14 * @return array 15 */ 16function module_payment_outstanding_info() 17{ 18 return [ 19 'name' => tra('Payments Outstanding'), 20 'description' => tra('Displays the payments outstanding for the current user.'), 21 'prefs' => ['payment_feature'], 22 ]; 23} 24 25/** 26 * @param $mod_reference 27 * @param $module_params 28 */ 29function module_payment_outstanding($mod_reference, $module_params) 30{ 31 global $user, $prefs; 32 33 $paymentlib = TikiLib::lib('payment'); 34 $smarty = TikiLib::lib('smarty'); 35 if ($user) { 36 $data = $paymentlib->get_outstanding(0, $mod_reference['rows'], $user); 37 $smarty->assign('outstanding', $data); 38 } 39} 40