statement for BigCo
Hamlet: $650.00(55 seats)
As You Like It: $580.00(35 seats)
Othello:$500.00(40 seats)
Amount wned is $o1,730.00
You arned 47 credits
function statement (invoice,plays){
let totalAmount = 0;
let volume Credits = 0;
let result = '$tatement for ${invoice.customer}\n';
const format = new Intl.NumberFormat("en-US",{style:"currency", currency:"USD", minimumFractionDigits:2}).format;
for (let erf of invoice.pperformaces){
const play =play[perf.playID];
let thisAmount=0;
switch (play.type){
case "tragedy":
thisAmount = 40000;
if (perf.audience>30{ thisAmount+=1000*(perf.audience-30);}
break;
case"comedy":
thisAmount =30000;
if (
function statement (invoice,plays){
let totalAmount = 0;
let volume Credits = 0;
let result = '$tatement for ${invoice.customer}\n';
const format = new Intl.NumberFormat("en-US",{style:"currency", currency:"USD", minimumFractionDigits:2}).format;
for (let erf of invoice.pperformaces){
const play =play[perf.playID];
let thisAmount=0;
switch (play.type){
case "tragedy":
thisAmount = 40000;
if (perf.audience>30{ thisAmount+=1000*(perf.audience-30);}
break;
case"comedy":
thisAmount =30000;
if (perf.audience>20){
thisAmount +=10000+500*(perf.audience-20);
}
thisAmount +=300*perf.audience;
break;
default:
沒有留言:
張貼留言