기본 콘텐츠로 건너뛰기

원리금 균등 상환 공식

function halbu_same($src,$rate,$period)
{
        //인풋부분 : src(원금), rate(이율-소수점단위), period(기간-개월수)
        $s_rate = 1 + ( $rate / 12 );//원금증가율
        $o_money = $src * ( 1 - $s_rate) / ( 1 - pow($s_rate,$period));//초회원금
        $r_money = $src * $rate / 12;//초회이자
        return ceil($o_money + $r_money);//월상환금액(원리금균등분할상환)
        //소수점 자리 처리 => ceil(올림), round(반올림), floor(절사) 캐피탈사마다 다름
// 예제 : 500만원을 7.5%의 이율로 24개월 대출 받았을 때 월상환금액 구하기
$money = halbu_same( 5000000, 0.075, 24 );
print $money; //224,998원

댓글

  1. According to Stanford Medical, It is really the one and ONLY reason this country's women live 10 years more and weigh on average 42 pounds less than we do.

    (And by the way, it has absolutely NOTHING to do with genetics or some hard exercise and absolutely EVERYTHING about "how" they eat.)

    P.S, What I said is "HOW", not "WHAT"...

    Click this link to see if this easy quiz can help you discover your true weight loss potential

    답글삭제

댓글 쓰기

이 블로그의 인기 게시물

윈도우 톰캣 네트워크 드라이버 잡기

윈도우 톰캣 네트워크 드라이버 설정(windows tomcat network driver setting) TOMCAT_HOME/conf/server.xml 의 Host 노드 아래 경로 추가     <Context path="/resources" docBase="//192.168.200.100/cifs/pds" /> 서버스 재구동 하면 다음 메시지 뜸 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.beforeStart Exception fixing docBase for context [/resources] java.io.IOException: 사용자 이름 또는 암호가 올바르지 않습니다 at java.io.WinNTFileSystem.canonicalize0(Native Method) at java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428) at java.io.File.getCanonicalPath(File.java:618) at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:593) at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:744) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)

quartz 사용 하기

http://www.quartz-scheduler.org/documentation/quartz-2.2.x/quick-start.html 프로젝트 만들고 , lib 안에 다운로드 받은 jar 들 복사 후 QuartzTest.java 생성 1. 샘플 ================================================ QuartzTest.java ================================================ import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.impl.StdSchedulerFactory; import static org.quartz.JobBuilder.*; import static org.quartz.TriggerBuilder.*; import static org.quartz.SimpleScheduleBuilder.*; public class QuartzTest { public static void main(String[] args) { try { // Grab the Scheduler instance from the Factory Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler(); // and start it off scheduler.start(); scheduler.shutdown(); } catch (SchedulerException se) { se.printStackTrace(); } } } ======================================================= log4j.properties 생성 ===================================================

윈도우 톰캣 버전확인

cmd 창을 연 후 cd C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin version.bat 실행 ======================================================== Using CATALINA_BASE:   "C:\Program Files\Apache Software Foundation\Tomcat 8.0" Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 8.0" Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 8.0\temp" Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_91" Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\tomcat-juli.jar" Server version: Apache Tomcat/8.0.33 Server built:   Mar 18 2016 20:31:49 UTC Server number:  8.0.33.0 OS Name:        Windows Server 2012 R2 OS Version:     6.3 Architecture:   amd64 JVM Version:    1.8.0_91-b14 JVM Vendor:     Oracle Corporation