ext request

This commit is contained in:
CHIEFSOFT\ameye
2023-12-09 17:05:19 -05:00
parent ae4546734c
commit 22081ddb74
+3 -3
View File
@@ -188,9 +188,9 @@ long WrenchContractStatus( CVars in, CVars &out )
"job_action": "NOTIFY_REQEXTENT"
}
*/
logfmt( logINFO, "~~~~ ~~~~~ WrenchContractStatus() CONTRACT_EXTEND_TIMELINE" );
logfmt( logINFO, "~~~~ ~~~~~ WrenchContractStatus() CONTRACT_REQUEST_TIMELINE" );
out["result"] = "CONTRACT_EXTEND_TIMELINE";
extension = REQ_LONG( in, "extension", 1, -1 );
// 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' "
@@ -199,7 +199,7 @@ long WrenchContractStatus( CVars in, CVars &out )
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());
pgsql_exec("UPDATE members_jobs_contract SET ext_request = now(), updated = now() 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() ) )
{