Skip to content

Instantly share code, notes, and snippets.

View adejorosam's full-sized avatar
🏠
Working from home

Samson Adejoro adejorosam

🏠
Working from home
View GitHub Profile
/// <summary>
/// Create an NGN investment
/// </summary>
[HttpPost("ngn")]
[ProducesResponseType(typeof(InvestmentExtendedResponse), 201)]
[ProducesResponseType(typeof(GenericResponse), 400)]
[ProducesResponseType(typeof(GenericResponse), 404)]
public async Task<IActionResult> CreateNgn([FromBody] CreateNgnInvestmentRequest req)
{
<?php
$loan_amount = 3000000; // 3,000,000.
$interest_annual_rate = 0.17; // 17%.
$expected = '{
"e_data":[
{
"ValueDate": "01-Jul-2023",
"GL Description": "Opening Balance",
"Debit": "",
"Credit": "",
// input
Loan amount = 3,000,000 Interest rate per annum = 17%
$jsonData = '{
"data": [
{
"ValueDate": "7/1/2023",
"Description": "Opening Balance",
"Debit": "",
"Credit": "",
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri(Body); WIDTH: 100%; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee border=0>
<TBODY>
<TR>
<TD vAlign=top align=center>
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD vAlign=top cellPadding=50 cellPadding=50 border=10 ><!-- / Header -->
<TABLE class="container header" style="BACKGROUND: #1a2155; width: 100%" cellSpacing=20 cellPadding=20 border=0>
<TBODY>
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri(Body); WIDTH: 100%; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee border=0>
<TBODY>
<TR>
<TD vAlign=top align=center>
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD vAlign=top cellPadding=50 cellPadding=50 border=10 ><!-- / Header -->
<TABLE class="container header" style="BACKGROUND: #1a2155; width: 100%" cellSpacing=20 cellPadding=20 border=0>
<TBODY>
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri(Body); WIDTH: 100%; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee border=0>
<TBODY>
<TR>
<TD vAlign=top align=center>
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD vAlign=top cellPadding=50 cellPadding=50 border=10 ><!-- / Header -->
<TABLE class="container header" style="BACKGROUND: #1a2155; width: 100%" cellSpacing=20 cellPadding=20 border=0>
<TBODY>
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 bgColor=#eeeeee border=0>
<TBODY>
<TR>
<TD vAlign=top align=center>
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD vAlign=top cellPadding=50 cellPadding=50 border=10 ><!-- / Header -->
<TABLE class="container header" style="BACKGROUND: #1a2155; width: 100%" cellSpacing=20 cellPadding=20 border=0>
<TBODY>
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri(Body); WIDTH: 100%; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee border=0>
<TBODY>
<TR>
<TD vAlign=top align=center>
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD vAlign=top cellPadding=50 cellPadding=50 border=10 ><!-- / Header -->
<TABLE class="container header" style="BACKGROUND: #1a2155; width: 100%" cellSpacing=20 cellPadding=20 border=0>
<TBODY>
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri(Body); WIDTH: 100%; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee border=0>
<TBODY>
<TR>
<TD vAlign=top align=center>
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD vAlign=top cellPadding=50 cellPadding=50 border=10 ><!-- / Header -->
<TABLE class="container header" style="BACKGROUND: #1a2155; width: 100%" cellSpacing=20 cellPadding=20 border=0>
<TBODY>
<TABLE class=full-width-container style="HEIGHT: 100%; FONT-FAMILY: Calibri(Body); WIDTH: 100%; PADDING-BOTTOM: 30px; PADDING-TOP: 30px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee border=0>
<TBODY>
<TR>
<TD vAlign=top align=center>
<TABLE class=container style="WIDTH: 720px" cellSpacing=0 cellPadding=0 width=720 bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD vAlign=top cellPadding=50 cellPadding=50 border=10 ><!-- / Header -->
<TABLE class="container header" style="BACKGROUND: #1a2155; width: 100%" cellSpacing=20 cellPadding=20 border=0>
<TBODY>