Færdiggjort

Figuring out if an item is paid for (extensions)

See deliverables for the source code

Currently; I have a need for an extension to figure out if an item has been paid for or not. Below is the source code. I know of 2 ways of approaching it. Both have their problem. The source code should explain that. What is needed is to fill out the extension that currently is a runtime error statement "Not implemented" Must find a solution that will fix both issues. Cannot just use logic (like

if totaldue=1162.92 and amountpaid=131.49 then return false (because that won't fix situations like if total due is 1162.93 and amountpaid is 132.41.

The purpose of this is for the computer to figure out if an item is paid for or not. Can be done with VB 2008 or 2010 RC Edition.

I need the full source code to fix the problem and must work on buyers environment.

## Deliverables

Imports [url removed, login to view]

Module Module1

Public Sub Main()

Dim AmountPaid As Decimal

Dim TotalDue As Decimal

AmountPaid = 131.49

TotalDue = 1162.92

Dim rets As Boolean

rets = [url removed, login to view](TotalDue)

[url removed, login to view](rets & " first method. Should be false")

rets = [url removed, login to view](TotalDue)

[url removed, login to view](rets & " second method. Should be false")

'needs to do .IsPaidInFull

AmountPaid = 15.11

TotalDue = 15.111

rets = [url removed, login to view](TotalDue)

[url removed, login to view](rets & " first method with rounding. Should be true")

rets = [url removed, login to view](TotalDue)

[url removed, login to view](rets & " second method with rounding. Should be true")

[url removed, login to view]()

AmountPaid = 131.49

TotalDue = 1162.92

rets = [url removed, login to view](TotalDue)

[url removed, login to view](rets & " needs to return false because its not paid in full")

AmountPaid = 15.11

TotalDue = 15.111

rets = [url removed, login to view](TotalDue)

'if using method1; then will be correct for number 2 but not for number 1

'if using method2; then will be correct for number 1 but not for number 2

[url removed, login to view](rets & " needs to return true because its paid in full (a person cannot pay less than a cent)")

End Sub

<Extension()>

Public Function IsPaidInFull(ByVal AmountPaid As Decimal, ByVal TotalDue As Decimal) As Boolean

Throw New Exception("Not implemented until you do the bid request")

End Function

<Extension()>

Public Function FirstMethodPaidInFull(ByVal AmountPaid As Decimal, ByVal TotalDue As Decimal) As Boolean

If FormatCurrency(AmountPaid) >= FormatCurrency(TotalDue) Then

Return True

End If

Return False

End Function

<Extension()>

Public Function SecondMethodPaidInFull(ByVal AmountPaid As Decimal, ByVal TotalDue As Decimal) As Boolean

If AmountPaid >= TotalDue Then

Return True

End If

Return False

End Function

End Module

## Platform

Windows 2008 Server Edition.

Evner: .NET, Ingeniørarbejde, MySQL, PHP, Software Arkitektur, Software Testning, Visual Basic

Se mere: what is the problem statement, what is problem statement, what is a problem statement, runtime computer, out source work, out in public, find the solution for, find a solution for, not paid, statement for purpose, figure out, cent server, public figure, Method Statement, purpose statement, paid find, extension sub, fix php runtime error, windows system error problem, php rets server

Om arbejdsgiveren:
( 781 bedømmelser ) Sydney, Australia

Projekt ID: #3316797

Tildelt til:

JaysonCole

See private message.

$21.25 USD på 1 dag
(67 bedømmelser)
4.5

2 freelancere byder i gennemsnit $28 på dette job

tedeschia

See private message.

$34 USD på 1 dag
(0 bedømmelser)
0.0