invoice-fs
Version:
Nostalgic command-line invoicing application producing plain text invoices and JSON data structures. Uses the file system as a database
21 lines (17 loc) • 603 B
JavaScript
var fs = require('fs'),
Customer = require('../lib/customer'),
out = require('../lib/out');
module.exports = function(command, extraCommands) {
if (extraCommands.length === 0) {
out.write("\nSupply the customer code or list customers to find the code.");
return;
}
var model = new Customer(extraCommands[0]);
out.writeCliTitle("Show Customer");
for (property in model.data) {
if (model.data.hasOwnProperty(property)) {
out.write(out.leftColumn(property, 13) + ": " + model.data[property]);
}
}
out.writeCliDivider();
};