小编pra*_*316的帖子

如何使用php计算excel pmt

一直在尝试将excel中使用的pmt函数实现到php中.我有公式,但计算显示不正确.

其6年期利率为30年,最终价值为833333.

正确的答案应该是10,541.

付款到期末,因此类型为零,现值为零.

<pre>
    $pv = 0;
    $fv = 833333;
    $i = 0.06/12;
    $n = 360;

    $pmt = (($pv - $fv) * $i )/ (1 - pow((1 + $i), (-$n))); 

    echo $pmt;
</pre>
Run Code Online (Sandbox Code Playgroud)

使用此链接作为公式的参考

html php excel

4
推荐指数
2
解决办法
6380
查看次数

如何在 Angular 7 中将数据从组件传递到 ngBootstrap 模式?

我有一个使用 ngFor 显示数据的表格。我需要在单击时以模态显示单个行数据。我可以通过将行作为 click 参数传递来将其记录在控制台中,但无法将其传递到模态中。

假设正在从服务中获取表数据,并且模态是与表位于同一组件文件中的模板引用。

这是创建的小提琴 https://stackblitz.com/edit/angular-xr8ud5

我使用了 angular 1.x 并且数据是通过解析传递的。我是 Angular 的新手,从未在 ngBootstrap 中工作过。

任何帮助表示赞赏。谢谢

javascript ng-bootstrap angular angular7

2
推荐指数
1
解决办法
6409
查看次数

标签 统计

angular ×1

angular7 ×1

excel ×1

html ×1

javascript ×1

ng-bootstrap ×1

php ×1