Created
July 2, 2011 23:07
-
-
Save J-Gull/1061759 to your computer and use it in GitHub Desktop.
test code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Purchase Invoice Program Code | |
#include "stdio.h" | |
#include "conio.h" | |
void main() | |
{ | |
CompanyInformationStruct company_information; | |
CustomerInformationStruct customer_information; | |
InvoiceInformaionSturct invoice_inforamtion; | |
InvoiceItemsStruct invoice_items; | |
prepare_invoice(); | |
print(); | |
} | |
function prepare_invoice(){ | |
} | |
function print(){ | |
printf(company_inforamtion); | |
printf(customer_information); | |
printf(invoice_information); | |
int total_amount = 0 | |
for(int i=0; i<invoice_items.size(), i++ ) | |
{ | |
InvoiceItem invoice_item = invoice_items[i]; | |
printf(invoice_item.number) | |
printf(invoice_item.description) | |
printf(invoice_item.amount) | |
total_amount += invoice_item.amount | |
} | |
puts total_amount | |
} | |
struct CompanyInformationStruct() | |
{ | |
string name; | |
string address; | |
string telephone; | |
string additional_information; | |
string terms; | |
} | |
struct CustomerInforamtionStruct(){ | |
string name; | |
string address; | |
string telephone; | |
} | |
struct InvoiceInformationStruct(){ | |
string date; | |
string signed_by; | |
int is_cleared; | |
int status; | |
} | |
struct InvoiceItemStruct(){ | |
string description; | |
int quantity; | |
float price; | |
float discount; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment