extenstion timeline

This commit is contained in:
CHIEFSOFT\ameye
2023-12-09 16:35:16 -05:00
parent d1f0fca68a
commit ae4546734c
4 changed files with 405 additions and 4 deletions
@@ -0,0 +1,175 @@
Subject: {{subject}} - {{title}}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{subject}} - {{title}}</title>
<style type="text/css">
body {margin: 0; padding: 0; min-width: 100%!important;}
img {height: auto;}
hr{
height: 1px;
background-color: #f1fcff;
border: none;
}
.content {width: 100%; max-width: 600px;}
.header {padding: 10px 10px 10px 10px;}
.innerpadding {padding: 10px 10px 10px 10px;}
.cent{ text-align:center; }
.borderbottom {border-bottom: 1px solid #f2eeed;}
.ls1{ border-color: aliceblue; color: aliceblue;}
.subhead {font-size: 12px; color: #ffffff; font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; letter-spacing: 3px;}
.h1, .h2, .bodycopy {color: #153643; font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;}
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
.bodycopy {font-size: 14px; line-height: 20px;}
.button {text-align: center; font-size: 16px; font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
.button a {color: #ffffff; text-decoration: none;}
.footer {padding: 20px 30px 15px 30px; bgcolor:#252f3e; background-color:#252f3e;}
.footercopy { font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; font-size: 14px; font-weight:bolder; color: #ffffff;}
.footercopy a {color: #ffffff; text-decoration: underline;}
</style>
</head>
<body yahoo bgcolor="#f6f8f1">
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<!--[if (gte mso 9)|(IE)]>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td bgcolor="#c7d8a7" class="header">
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
<tr>
<td height="50">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="h1" style="padding: 5px 0 0 0;">
<a href="https://www.wrenchboard.com/"><img src="https://www.wrenchboard.com/assets/images/wrenchboard-logo-text.png" style="width: 200px; height:auto;" alt="WrenchBoard"></a>
</td>
</tr>
<tr>
<td class="subhead" style="padding: 0 0 0 3px;">
{{site_trade_name}}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="innerpadding borderbottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bodycopy">
<b>Dear {{member_firstname}}</b>,
</td>
</tr>
<tr>
<td class="bodycopy">
You have requested extenstion of timeline for <b>{{contract}}</b> as shown below at <a href="https://{{server_name}}/eoffer?offerID={{offer_code}}">{{site_name}}</a> .
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="innerpadding borderbottom">
<table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; ">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="bodycopy" style="font-size: 14px; font-family: sans-serif; border: 1px solid #f2eeed; background-color:#e6f9ff;">
<tr>
<td style='width: 100px;'>Task ID:</td><td>{{contract}} </td>
</tr>
<tr>
<td style='width: 100px;'>Title:</td><td>{{title}} </td>
</tr>
<tr>
<td style='width: 100px;'>Price:</td><td>{{amount}} {{currency}} </td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="bodycopy"><b>Please login into your account to accept or reject the completion of this task.</b>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td class="innerpadding bodycopy">
Please contact us at {{server_name}}/contact if you have any question about this email.
</td>
</tr>
<tr>
<td class="innerpadding bodycopy">
{{site_name}} Team
<br>
{{server_name}}
</td>
</tr>
<tr>
<td class="footer">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="footercopy">
&reg; {{site_name}} {{YYYY}}<br/>
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="{{main_site_url}}contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
</td>
</tr>
<tr>
<td align="center" style="padding: 20px 0 0 0;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
<a href="https://www.facebook.com/wrenchboard/">
<img src="{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
</a>
</td>
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
<a href="http://www.twitter.com/">
<img src="{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</body>
</html>
@@ -0,0 +1,175 @@
Subject: {{subject}} - {{title}}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{subject}} - {{title}}</title>
<style type="text/css">
body {margin: 0; padding: 0; min-width: 100%!important;}
img {height: auto;}
hr{
height: 1px;
background-color: #f1fcff;
border: none;
}
.content {width: 100%; max-width: 600px;}
.header {padding: 10px 10px 10px 10px;}
.innerpadding {padding: 10px 10px 10px 10px;}
.cent{ text-align:center; }
.borderbottom {border-bottom: 1px solid #f2eeed;}
.ls1{ border-color: aliceblue; color: aliceblue;}
.subhead {font-size: 12px; color: #ffffff; font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; letter-spacing: 3px;}
.h1, .h2, .bodycopy {color: #153643; font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;}
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
.bodycopy {font-size: 14px; line-height: 20px;}
.button {text-align: center; font-size: 16px; font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
.button a {color: #ffffff; text-decoration: none;}
.footer {padding: 20px 30px 15px 30px; bgcolor:#252f3e; background-color:#252f3e;}
.footercopy { font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; font-size: 14px; font-weight:bolder; color: #ffffff;}
.footercopy a {color: #ffffff; text-decoration: underline;}
</style>
</head>
<body yahoo bgcolor="#f6f8f1">
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<!--[if (gte mso 9)|(IE)]>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td bgcolor="#c7d8a7" class="header">
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
<tr>
<td height="50">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="h1" style="padding: 5px 0 0 0;">
<a href="https://www.wrenchboard.com/"><img src="https://www.wrenchboard.com/assets/images/wrenchboard-logo-text.png" style="width: 200px; height:auto;" alt="WrenchBoard"></a>
</td>
</tr>
<tr>
<td class="subhead" style="padding: 0 0 0 3px;">
{{site_trade_name}}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="innerpadding borderbottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bodycopy">
<b>Dear {{member_firstname}}</b>,
</td>
</tr>
<tr>
<td class="bodycopy">
We are notifying you that task <b>{{contract}}</b> as shown below at <a href="https://{{server_name}}/eoffer?offerID={{offer_code}}">{{site_name}}</a> need extenstion approval.
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="innerpadding borderbottom">
<table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; ">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="bodycopy" style="font-size: 14px; font-family: sans-serif; border: 1px solid #f2eeed; background-color:#e6f9ff;">
<tr>
<td style='width: 100px;'>Task ID:</td><td>{{contract}} </td>
</tr>
<tr>
<td style='width: 100px;'>Title:</td><td>{{title}} </td>
</tr>
<tr>
<td style='width: 100px;'>Price:</td><td>{{amount}} {{currency}} </td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="bodycopy"><b>Please login into your account to accept or reject the completion of this task.</b>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td class="innerpadding bodycopy">
Please contact us at {{server_name}}/contact if you have any question about this email.
</td>
</tr>
<tr>
<td class="innerpadding bodycopy">
{{site_name}} Team
<br>
{{server_name}}
</td>
</tr>
<tr>
<td class="footer">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="footercopy">
&reg; {{site_name}} {{YYYY}}<br/>
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="{{main_site_url}}contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
</td>
</tr>
<tr>
<td align="center" style="padding: 20px 0 0 0;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
<a href="https://www.facebook.com/wrenchboard/">
<img src="{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
</a>
</td>
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
<a href="http://www.twitter.com/">
<img src="{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</body>
</html>
+40 -3
View File
@@ -175,15 +175,52 @@ long WrenchContractStatus( CVars in, CVars &out )
}
}
break;
case CONTRACT_REQUEST_TIMELINE:
/*
{
"uid": "3119b744-42ad-4834-bb83-b737588754ca",
"member_id": "1",
"sessionid": "38E1B8E88F0A1F029C390FCBC63573C1E71566C1C1FB586203B6F2D9E2440BDB",
"action": 14015,
"contract": "8R0B101BRW",
"contract_uid": "a12cf3b6-391e-4003-803d-799128d528a4",
"job_action": "NOTIFY_REQEXTENT"
}
*/
logfmt( logINFO, "~~~~ ~~~~~ WrenchContractStatus() CONTRACT_EXTEND_TIMELINE" );
out["result"] = "CONTRACT_EXTEND_TIMELINE";
extension = REQ_LONG( in, "extension", 1, -1 );
ret = load_db_record( out, "SELECT * FROM members_jobs_contract "
" WHERE status IN (1,2) AND contract='%s' "
" AND id=%lu AND client_id =%lu "
" AND delivery_date < now()",in["job_contract"].c_str(),in["contract_id"].Long(),in["member_id"].Long() );
logfmt( logINFO, "~~~~ ~~~~~ WrenchContractStatus() CONTRACT_REQUEST_TIMELINEret 1 = %lu",ret );
if (ret>0)
{
// pgsql_exec("UPDATE members_jobs_contract SET due_remind = NULL, delivery_date = now() +'%lu days' WHERE status IN (1,2) AND id = %lu AND contract='%s'",extension, in["contract_id"].Long() ,in["job_contract"].c_str());
// make sure the update was done
if ( load_db_record( out, "SELECT * FROM members_jobs_contract WHERE id=%lu AND member_id =%lu AND delivery_date > now()",in["contract_id"].Long(),in["member_id"].Long() ) )
{
project_email(CONTRACT_REQUEST_TIMELINE, in, out);
out["result"] = "We have requested the timeline increase";
}
}
break;
case CONTRACT_EXTEND_TIMELINE:
logfmt( logINFO, "~~~~ ~~~~~ WrenchContractStatus() CONTRACT_EXTEND_TIMELINE" );
out["result"] = "CONTRACT_EXTEND_TIMELINE";
extension = REQ_LONG( in, "extension", 1, -1 );
ret = load_db_record( out, "SELECT * FROM members_jobs_contract WHERE status IN (1,2) AND contract='%s' AND id=%lu AND member_id =%lu AND delivery_date < now()",in["job_contract"].c_str(),in["contract_id"].Long(),in["member_id"].Long() );
ret = load_db_record( out, "SELECT * FROM members_jobs_contract "
" WHERE status IN (1,2) AND contract='%s' "
" AND id=%lu AND member_id =%lu "
" AND delivery_date < now()",in["job_contract"].c_str(),in["contract_id"].Long(),in["member_id"].Long() );
logfmt( logINFO, "~~~~ ~~~~~ WrenchContractStatus() ret 1 = %lu",ret );
if (ret)
if (ret>0)
{
pgsql_exec("UPDATE members_jobs_contract SET due_remind = NULL, delivery_date = now() +'%lu days' WHERE status IN (1,2) AND id = %lu AND contract='%s'",extension, in["contract_id"].Long() ,in["job_contract"].c_str());
// make sure the update was done
+15 -1
View File
@@ -1071,6 +1071,20 @@ long project_email(long mailtype, CVars in, CVars &out) {
-rw-r--r--. 1 oameye dev 9374 May 19 20:07 contract_acceptcomplete_m.mailfile
*/
break;
case CONTRACT_REQUEST_TIMELINE:
vars2form(out, form);
form.LetStr("subject", "Due Date Extenstion Requsted");
form.LetStr("email", out["member_email"].c_str());
form.Email("PROJ/contract_extension_request_m.mailfile");
vars2form(out, form);
form.LetStr("subject", "Due Date Extenstion Request Sent");
form.LetStr("email", out["client_email"].c_str());
form.Email("PROJ/contract_extension_request_c.mailfile");
break;
case CONTRACT_REJECT_COMPLETE:
vars2form(out, form);
@@ -1079,7 +1093,7 @@ long project_email(long mailtype, CVars in, CVars &out) {
form.Email("PROJ/contract_rejectcomplete_m.mailfile");
vars2form(out, form);
form.LetStr("subject", "Task Completion Rejected");
form.LetStr("subject", "Your Task Completion was Rejected");
form.LetStr("email", out["client_email"].c_str());
form.Email("PROJ/contract_rejectcomplete_c.mailfile");