2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-10-27 08:28:16 +01:00
< meta name = "generator" content = "ZealOS V1.04" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-10-08 07:06:11 +01:00
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
2021-07-03 05:07:57 +01:00
< / style >
< / head >
< body >
2021-07-05 01:12:38 +01:00
< pre style = "font-family:monospace;font-size:12pt" >
2021-07-03 05:07:57 +01:00
< a name = "l1" > < / a > < span class = cF1 > U0< / span > < span class = cF0 > BgtEntryDel2(CBgtEntry *tmpb)
< a name = "l2" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l3" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpb-> type != BE_TEMPLATE_COPY)
< a name = "l4" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l5" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (tmpb-> credit);
< a name = "l6" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (tmpb-> debit);
< a name = "l7" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (tmpb-> desc);
< a name = "l8" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l9" > < / a > }
< a name = "l10" > < / a >
< a name = "l11" > < / a > CBgtEntry *BgtEntryCopy(CBgtEntry *tmpb, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > periodic_copy)
< a name = "l12" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l13" > < / a > CBgtEntry *res = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF0 > CBgtEntry< / span > < span class = cF7 > )< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l14" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l15" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (res, tmpb, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF0 > CBgtEntry< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l16" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (periodic_copy)
< a name = "l17" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l18" > < / a > res-> credit = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (tmpb-> credit);
< a name = "l19" > < / a > res-> debit = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (tmpb-> debit);
< a name = "l20" > < / a > res-> desc = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (tmpb-> desc);
< a name = "l21" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l22" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l23" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l24" > < / a > }
< a name = "l25" > < / a >
< a name = "l26" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > BgtEntryDel(CBgtEntry *tmpb)
< a name = "l27" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l28" > < / a > BgtEntryDel2(tmpb);
< a name = "l29" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (tmpb);
2021-07-03 05:07:57 +01:00
< a name = "l30" > < / a > }
< a name = "l31" > < / a >
< a name = "l32" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > BgtIns(CBgtEntry *tmpb)
< a name = "l33" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l34" > < / a > CBgtEntry *tmpb1 = b_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l35" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l36" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpb1 != & b_head & & tmpb1-> date < tmpb-> date)
< a name = "l37" > < / a > tmpb1 = tmpb1-> next;
< a name = "l38" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmpb, tmpb1-> last);
2021-07-03 05:07:57 +01:00
< a name = "l39" > < / a > }
< a name = "l40" > < / a >
< a name = "l41" > < / a > < / span > < span class = cF1 > class< / span > < span class = cF0 > CBgtEntryForm
< a name = "l42" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l43" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > date [< / span > < span class = cFE > 512< / span > < span class = cF0 > ] format < / span > < span class = cF6 > " $DA-P,A=\" Date :%s\" $\n" < / span > < span class = cF0 > ;
< a name = "l44" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > amount format < / span > < span class = cF6 > " Amount $$$DA,A=\" %10.2f\" $\n" < / span > < span class = cF0 > ;
< a name = "l45" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > credit [< / span > < span class = cFE > 512< / span > < span class = cF0 > ] format < / span > < span class = cF6 > " $DA-P,A=\" Credit (from) Acct:%s\" $\n" < / span > < span class = cF0 > ;
< a name = "l46" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > debit [< / span > < span class = cFE > 512< / span > < span class = cF0 > ] format < / span > < span class = cF6 > " $DA-P,A=\" Debit (to) Acct:%s\" $\n" < / span > < span class = cF0 > ;
< a name = "l47" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > desc [< / span > < span class = cFE > 512< / span > < span class = cF0 > ] format < / span > < span class = cF6 > " $DA-P,A=\" Desc :%s\" $\n" < / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l48" > < / a > };
< a name = "l49" > < / a >
< a name = "l50" > < / a > CBgtEntry *BgtEntryPrompt(CBgtEntry *< / span > < span class = cF1 > default< / span > < span class = cF0 > =< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
< a name = "l51" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l52" > < / a > CBgtEntryForm b;
< a name = "l53" > < / a > CBgtEntry *tmpb;
< a name = "l54" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st;
2021-07-03 05:07:57 +01:00
< a name = "l55" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l56" > < / a > < / span > < span class = cF5 > MemSet< / span > < span class = cF0 > (& b, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF0 > CBgtEntryForm< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l57" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (& b.date, < / span > < span class = cF6 > " *" < / span > < span class = cF0 > );
< a name = "l58" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF1 > default< / span > < span class = cF0 > )
< a name = "l59" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l60" > < / a > < / span > < span class = cF5 > StrPrint< / span > < span class = cF0 > (b.date, < / span > < span class = cF6 > " %D" < / span > < span class = cF0 > , < / span > < span class = cF1 > default< / span > < span class = cF0 > -> date);
< a name = "l61" > < / a > b.amount = < / span > < span class = cF1 > default< / span > < span class = cF0 > -> amount;
< a name = "l62" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (b.credit, < / span > < span class = cF1 > default< / span > < span class = cF0 > -> credit);
< a name = "l63" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (b.debit , < / span > < span class = cF1 > default< / span > < span class = cF0 > -> debit);
< a name = "l64" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (b.desc , < / span > < span class = cF1 > default< / span > < span class = cF0 > -> desc);
< a name = "l65" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l66" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > )
< a name = "l67" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > PopUpForm< / span > < span class = cF7 > (< / span > < span class = cF0 > & b< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l68" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l69" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!*b.credit)
< a name = "l70" > < / a > {
< a name = "l71" > < / a > st = BgtPopUpAcct(< / span > < span class = cF6 > " Credit Acct\n\n" < / span > < span class = cF0 > );
< a name = "l72" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (st != < / span > < span class = cF3 > DOCM_CANCEL< / span > < span class = cF0 > )
< a name = "l73" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (b.credit, st);
< a name = "l74" > < / a > }
< a name = "l75" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!*b.debit)
< a name = "l76" > < / a > {
< a name = "l77" > < / a > st = BgtPopUpAcct(< / span > < span class = cF6 > " Debit Acct\n\n" < / span > < span class = cF0 > );
< a name = "l78" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (st != < / span > < span class = cF3 > DOCM_CANCEL< / span > < span class = cF0 > )
< a name = "l79" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (b.debit, st);
< a name = "l80" > < / a > }
< a name = "l81" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l82" > < / a > {
< a name = "l83" > < / a > tmpb = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF0 > CBgtEntry< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l84" > < / a > tmpb-> date = < / span > < span class = cF5 > Str2Date< / span > < span class = cF0 > (b.date);
< a name = "l85" > < / a > tmpb-> amount = b.amount;
< a name = "l86" > < / a > tmpb-> credit = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (b.credit);
< a name = "l87" > < / a > tmpb-> debit = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (b.debit);
< a name = "l88" > < / a > tmpb-> desc = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (b.desc);
< a name = "l89" > < / a > tmpb-> type = BE_NORMAL;
< a name = "l90" > < / a > StrFileAdd(tmpb-> credit, & accts_table_strs, accts_table);
< a name = "l91" > < / a > StrFileAdd(tmpb-> debit, & accts_table_strs, accts_table);
< a name = "l92" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > tmpb;
< a name = "l93" > < / a > }
< a name = "l94" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l95" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l96" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l97" > < / a > }
< / span > < / pre > < / body >
< / html >