|
Size: 141
Comment:
|
Size: 795
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 6: | Line 6: |
| - Branch Import - Vinod Patel | * Branch Import: Vinod Patel |
| Line 8: | Line 8: |
| - Category Import - Vinod Patel | * Category Import: Vinod Patel ==== Creating Customer Groups ==== {{{ next_token();//Group Code if (code[0]) { if (!lookup(&ifdb[DRTYP], code)) srec->drtype = ifdb[DRTYP].offset->ptr.record; else { struct s_sdrtyp *sdrtyp = recbuf[SDRTYP]; getbuc(&fdb[DRTYP], IMPORT_DEFREC, sdrtyp); strncpy(sdrtyp->drtcode, code, sizeof(sdrtyp->drtcode)-1); strncpy(sdrtyp->drtname,"ADDED BY IMPORT",sizeof(sdrtyp->drtname)-1); addrec(&fdb[DRTYP], sdrtyp, drt_extnflds); printf("%s added group\n", code); if (lookup(&ifdb[DRTYP], code)) printf("Error adding group '%s'\n",code); else srec->drtype = ifdb[DRTYP].offset->ptr.record; } } }}} |
Add useful import snippets here
Program examples
- Branch Import: Vinod Patel
- Category Import: Vinod Patel
Creating Customer Groups
next_token();//Group Code
if (code[0])
{
if (!lookup(&ifdb[DRTYP], code))
srec->drtype = ifdb[DRTYP].offset->ptr.record;
else
{
struct s_sdrtyp *sdrtyp = recbuf[SDRTYP];
getbuc(&fdb[DRTYP], IMPORT_DEFREC, sdrtyp);
strncpy(sdrtyp->drtcode, code, sizeof(sdrtyp->drtcode)-1);
strncpy(sdrtyp->drtname,"ADDED BY IMPORT",sizeof(sdrtyp->drtname)-1);
addrec(&fdb[DRTYP], sdrtyp, drt_extnflds);
printf("%s added group\n", code);
if (lookup(&ifdb[DRTYP], code))
printf("Error adding group '%s'\n",code);
else
srec->drtype = ifdb[DRTYP].offset->ptr.record;
}
}