Skip to content

81_黄鑫实_第一课作业 - #6

Open
DerekHuangDr wants to merge 88 commits into
Guigulive:81-黄鑫实from
DerekHuangDr:master
Open

81_黄鑫实_第一课作业#6
DerekHuangDr wants to merge 88 commits into
Guigulive:81-黄鑫实from
DerekHuangDr:master

Conversation

@DerekHuangDr

Copy link
Copy Markdown

第一次照抄作业,添加了一些 comment, 但执行逻辑还是有些懵懂.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code snippet: if(employee != 0x0) {
uint payment = salary * (now - lastPayday) / payDuration;
employee.transfer(payment);
}

is for paying all the rest due, because the employer owes the employee the salary from the last pay day to now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before updating the salary, make sure you pay out the employee with the old salary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants