/*
 * DCC_QUOTE.pgc - au 모듈 서비스 DCC_QUOTE (one service = one file).
 * 해외승인 DCC 환산 견적(통화 -> 원화).
 * Moved verbatim from the former inline au_svr.pgc; runs on the caller's XA
 * branch (no EXEC SQL CONNECT). Advertised by au_svr at tpsvrinit.
 */
#include "DCC_QUOTE.h"

void DCC_QUOTE(TPSVCINFO *p)
{
    UBFH *b = (UBFH *)p->data;
    char ccy[8];
    long fx, rate = 1350, krw;
    fx = getl(b, T_FX_AMT);
    gets_(b, T_CCY, ccy, sizeof(ccy)); if (ccy[0] == 0) strcpy(ccy, "USD");
    krw = fx * rate / 100;
    setl(b, T_AMOUNT, krw);
    setl(b, T_ARG1, rate);
    OK(b);
}
