The entry command no longer handles effective dates
This commit is contained in:
parent
8e43a27211
commit
ce206a392a
1 changed files with 1 additions and 10 deletions
|
|
@ -38,7 +38,6 @@ namespace {
|
||||||
struct xact_template_t
|
struct xact_template_t
|
||||||
{
|
{
|
||||||
optional<date_t> date;
|
optional<date_t> date;
|
||||||
optional<date_t> eff_date;
|
|
||||||
optional<string> code;
|
optional<string> code;
|
||||||
optional<string> note;
|
optional<string> note;
|
||||||
mask_t payee_mask;
|
mask_t payee_mask;
|
||||||
|
|
@ -62,9 +61,6 @@ namespace {
|
||||||
else
|
else
|
||||||
out << _("Date: <today>") << std::endl;
|
out << _("Date: <today>") << std::endl;
|
||||||
|
|
||||||
if (eff_date)
|
|
||||||
out << _("Effective: ") << *eff_date << std::endl;
|
|
||||||
|
|
||||||
if (code)
|
if (code)
|
||||||
out << _("Code: ") << *code << std::endl;
|
out << _("Code: ") << *code << std::endl;
|
||||||
if (note)
|
if (note)
|
||||||
|
|
@ -116,7 +112,7 @@ namespace {
|
||||||
args_to_xact_template(value_t::sequence_t::const_iterator begin,
|
args_to_xact_template(value_t::sequence_t::const_iterator begin,
|
||||||
value_t::sequence_t::const_iterator end)
|
value_t::sequence_t::const_iterator end)
|
||||||
{
|
{
|
||||||
regex date_mask(_("([0-9]+(?:[-/.][0-9]+)?(?:[-/.][0-9]+))?(?:=.*)?"));
|
regex date_mask(_("([0-9]+(?:[-/.][0-9]+)?(?:[-/.][0-9]+))?"));
|
||||||
regex dow_mask(_("(sun|mon|tue|wed|thu|fri|sat)"));
|
regex dow_mask(_("(sun|mon|tue|wed|thu|fri|sat)"));
|
||||||
smatch what;
|
smatch what;
|
||||||
|
|
||||||
|
|
@ -129,8 +125,6 @@ namespace {
|
||||||
if (check_for_date &&
|
if (check_for_date &&
|
||||||
regex_match((*begin).to_string(), what, date_mask)) {
|
regex_match((*begin).to_string(), what, date_mask)) {
|
||||||
tmpl.date = parse_date(what[0]);
|
tmpl.date = parse_date(what[0]);
|
||||||
if (what.size() == 2)
|
|
||||||
tmpl.eff_date = parse_date(what[1]);
|
|
||||||
check_for_date = false;
|
check_for_date = false;
|
||||||
}
|
}
|
||||||
else if (check_for_date &&
|
else if (check_for_date &&
|
||||||
|
|
@ -261,9 +255,6 @@ namespace {
|
||||||
else
|
else
|
||||||
added->_date = tmpl.date;
|
added->_date = tmpl.date;
|
||||||
|
|
||||||
if (tmpl.eff_date)
|
|
||||||
added->_date_eff = tmpl.eff_date;
|
|
||||||
|
|
||||||
if (matching) {
|
if (matching) {
|
||||||
added->payee = matching->payee;
|
added->payee = matching->payee;
|
||||||
added->code = matching->code;
|
added->code = matching->code;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue