Job country currenies

This commit is contained in:
CHIEFSOFT\ameye
2023-06-27 15:24:01 -04:00
parent 4614f79ff3
commit 86d1c1cb69
2 changed files with 13 additions and 4 deletions
+10 -2
View File
@@ -279,11 +279,13 @@ long WrenchUserJobsInterestList(CVars in, CVars &out) {
const PGresult *res = pgsql_query("SELECT mm.id AS client_id, mm.uid AS client_uid, "
" mm.firstname AS client_name, m.offer_code, m.uid AS offer_uid, "
" mo.member_id, mm.added::date AS client_added, to_char(mo.added, 'Dy Mon dd, yyyy HH:MI AM') AS sent, "
" j.title,j.description,m.job_id,to_char( m.expire, 'Dy Mon dd, yyyy HH:MI AM') AS expire,j.price AS job_price,mo.uid AS interest_uid "
" j.title,j.description,m.job_id,to_char( m.expire, 'Dy Mon dd, yyyy HH:MI AM') AS expire,j.price AS job_price,mo.uid AS interest_uid, "
" c.code AS currency_code, c.description AS currency_description,j.country "
" FROM members_offer_interest mo "
" LEFT JOIN members_jobs_offer m ON m.id = mo.offer_id "
" LEFT JOIN members_jobs j ON j.id=m.job_id "
" LEFT JOIN members mm ON mm.id = mo.member_id "
" LEFT JOIN currency c ON c.country=j.country "
" WHERE m.status = 1 AND m.client_id=0 "
" AND m.expire IS NOT NULL AND m.expire> now() "
" AND mo.member_id = %lu ORDER BY mo.added DESC LIMIT %lu OFFSET %lu",member_id, limit, offset);
@@ -331,7 +333,6 @@ long WrenchUserJobsInterestList(CVars in, CVars &out) {
snprintf(vname, sizeof (vname), "client_ratings_%05d", i);
out[vname] = "0";
snprintf(vname, sizeof (vname), "offer_code_%05d", i);
out[vname] = rec["offer_code"];
@@ -355,6 +356,13 @@ long WrenchUserJobsInterestList(CVars in, CVars &out) {
snprintf(vname, sizeof (vname), "price_%05d", i);
out[vname] = rec["job_price"];
snprintf(vname, sizeof (vname), "job_country_%05d", i);
out[vname] = rec["country"];
snprintf(vname, sizeof (vname), "currency_%05d", i);
out[vname] = rec["currency_description"];
snprintf(vname, sizeof (vname), "currency_code_%05d", i);
out[vname] = rec["currency_code"];
}
}
+3 -2
View File
@@ -115,8 +115,9 @@ class ResultFormatter extends Model
"job_id" => $out["job_id_${key}"],
"expire" => $out["expire_${key}"],
"price" => $out["price_${key}"],
'currency' => 'Naira',
'currency_code' => 'NGN',
'job_country' => $out["job_country_${key}"],
'currency' => $out["currency_${key}"],
'currency_code' => $out["currency_code_${key}"],
);
}