add agent name in navbar, add matiruty button in recurring
parent
a3067c5ad4
commit
dfa6ffc54f
|
@ -32,4 +32,5 @@ download/
|
|||
/img/*
|
||||
upload/
|
||||
CONFIG/config.php
|
||||
CONFIG/config-local.php
|
||||
|
||||
|
|
|
@ -43,7 +43,8 @@ require_login();
|
|||
</ul>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<ul class="nav navbar-nav navbar-right" style="display: flex; align-items: center;">
|
||||
<p class="" style="margin-top: 10px; color: #FFFFFF;"><?php echo $_SESSION['name'] ?? ''; ?></p>
|
||||
<li><a href="/Admin/Signout">Signout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -51,8 +51,24 @@
|
|||
$spStmt->close();
|
||||
}
|
||||
|
||||
// Handle maturity for recurring accounts
|
||||
if (isset($_POST['recurring_maturity_submit']) && !empty($_POST['maturity_acno'])) {
|
||||
$maturityAcno = $_POST['maturity_acno'];
|
||||
$maturityDate = date('Y-m-d');
|
||||
|
||||
$maturitySql = "UPDATE `{$GLOBALS['arif_ac']}` SET STATUS = 'matured', CLOSING_DATE = ? WHERE AA_ACNO = ?";
|
||||
$maturityStmt = $conn->prepare($maturitySql);
|
||||
|
||||
if ($maturityStmt->bind_param("ss", $maturityDate, $maturityAcno) && $maturityStmt->execute()) {
|
||||
echo "<div class='alert alert-success'>Recurring A/C <strong>{$maturityAcno}</strong> marked as matured.</div>";
|
||||
} else {
|
||||
echo "<div class='alert alert-danger'>Failed to mark Recurring A/C <strong>{$maturityAcno}</strong> as matured.</div>";
|
||||
}
|
||||
|
||||
$maturityStmt->close();
|
||||
}
|
||||
|
||||
// Get agent list for dropdown
|
||||
// $getAgentListsQuery = "SELECT * FROM " . $GLOBALS['arif_users'] . " WHERE type = 'agent'";
|
||||
$getAgentListsQuery = "SELECT * FROM " . $GLOBALS['arif_users'] . "";
|
||||
$agentResult = $conn->query($getAgentListsQuery);
|
||||
$agentList = [];
|
||||
|
@ -158,7 +174,16 @@
|
|||
|
||||
} elseif ($row["AA_TYPE"]== "Recurring") {
|
||||
echo "
|
||||
<tr><th colspan='2'><span class='text-center'>Recurring A/C of ".$row["AA_NAME"]. "</span></th></tr>
|
||||
<tr>
|
||||
<th style='vertical-align: middle;'>Recurring A/C of ".$row["AA_NAME"]. "</th>
|
||||
<td style='vertical-align: middle; text-align: right;'>
|
||||
<form method='post' style='display: inline;'>
|
||||
<input type='hidden' name='maturity_acno' value='".$row["AA_ACNO"]."'>
|
||||
<button type='submit' name='recurring_maturity_submit' class='btn " . ($row["STATUS"] === 'matured' ? 'btn-success' : 'btn-info') . "'>" . ($row['STATUS'] === 'matured' ? 'Matured' : 'Mark as Matured') . "</button>
|
||||
" . ($row["STATUS"] === 'matured' ? "<br/><span>" . date('d-m-Y', strtotime($row["CLOSING_DATE"])) . "</span>" : "") . "
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ACCOUNT NO.</th>
|
||||
<td>".$row["AA_ACNO"]. "</td>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
// Login successful
|
||||
$_SESSION['user_id'] = $user['user_id'];
|
||||
$_SESSION['type'] = $user['type'];
|
||||
$_SESSION['name'] = $user['user_name'];
|
||||
|
||||
echo "<div class='alert alert-success'>Login successful. Redirecting...</div>";
|
||||
echo "<script>setTimeout(() => { window.location.href = '/Admin/View_AC?Type=Loan'; }, 2000);</script>";
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
use Twig\Environment;
|
||||
use Twig\Error\LoaderError;
|
||||
use Twig\Error\RuntimeError;
|
||||
use Twig\Extension\SandboxExtension;
|
||||
use Twig\Markup;
|
||||
use Twig\Sandbox\SecurityError;
|
||||
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||
use Twig\Source;
|
||||
use Twig\Template;
|
||||
|
||||
/* server/import/index.twig */
|
||||
class __TwigTemplate_12ba82fdec18e1e2042d8eba3d3724c6 extends Template
|
||||
{
|
||||
private $source;
|
||||
private $macros = [];
|
||||
|
||||
public function __construct(Environment $env)
|
||||
{
|
||||
parent::__construct($env);
|
||||
|
||||
$this->source = $this->getSourceContext();
|
||||
|
||||
$this->blocks = [
|
||||
'title' => [$this, 'block_title'],
|
||||
];
|
||||
}
|
||||
|
||||
protected function doGetParent(array $context)
|
||||
{
|
||||
// line 1
|
||||
return "import.twig";
|
||||
}
|
||||
|
||||
protected function doDisplay(array $context, array $blocks = [])
|
||||
{
|
||||
$macros = $this->macros;
|
||||
$this->parent = $this->loadTemplate("import.twig", "server/import/index.twig", 1);
|
||||
$this->parent->display($context, array_merge($this->blocks, $blocks));
|
||||
}
|
||||
|
||||
// line 3
|
||||
public function block_title($context, array $blocks = [])
|
||||
{
|
||||
$macros = $this->macros;
|
||||
echo _gettext("Importing into the current server");
|
||||
}
|
||||
|
||||
public function getTemplateName()
|
||||
{
|
||||
return "server/import/index.twig";
|
||||
}
|
||||
|
||||
public function isTraitable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getDebugInfo()
|
||||
{
|
||||
return array ( 46 => 3, 35 => 1,);
|
||||
}
|
||||
|
||||
public function getSourceContext()
|
||||
{
|
||||
return new Source("", "server/import/index.twig", "/home/dev/web/arif.off/public_html/pma/templates/server/import/index.twig");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue