Job country currenies
This commit is contained in:
@@ -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"];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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}"],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user